diff --git a/Metadata/ClassMetadata.php b/Metadata/ClassMetadata.php index 0be0535..5da84cb 100644 --- a/Metadata/ClassMetadata.php +++ b/Metadata/ClassMetadata.php @@ -34,7 +34,7 @@ class ClassMetadata extends MergeableClassMetadata public function addMethodMetadata(BaseMethodMetadata $metadata) { if ($this->reflection->isFinal()) { - throw new RuntimeException(sprintf('Class "%s" is declared final, and cannot be secured.', $reflection->name)); + throw new RuntimeException(sprintf('Class "%s" is declared final, and cannot be secured.', $metadata->reflection->name)); } if ($metadata->reflection->isStatic()) {