diff --git a/LazyProxy/PhpDumper/LazyLoadingValueHolderGenerator.php b/LazyProxy/PhpDumper/LazyLoadingValueHolderGenerator.php index d4ce682..8ec2993 100644 --- a/LazyProxy/PhpDumper/LazyLoadingValueHolderGenerator.php +++ b/LazyProxy/PhpDumper/LazyLoadingValueHolderGenerator.php @@ -32,7 +32,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);