diff --git a/LazyProxy/PhpDumper/LazyLoadingValueHolderGenerator.php b/LazyProxy/PhpDumper/LazyLoadingValueHolderGenerator.php index 5a63746..2ff31bb 100644 --- a/LazyProxy/PhpDumper/LazyLoadingValueHolderGenerator.php +++ b/LazyProxy/PhpDumper/LazyLoadingValueHolderGenerator.php @@ -88,7 +88,7 @@ public function generate(\ReflectionClass $originalClass, ClassGenerator $classG $newBody = preg_replace('/^(\$this->initializer[a-zA-Z0-9]++) && .*;\n\nreturn (\$this->valueHolder)/', '$1 || $2', $body); if ($body === $newBody) { - throw new \UnexpectedValueException(sprintf('Unexpected lazy-proxy format generated for method %s::__destruct().', $originalClass->name)); + throw new \UnexpectedValueException(sprintf('Unexpected lazy-proxy format generated for method "%s::__destruct()".', $originalClass->name)); } $destructor->setBody($newBody);