Skip to content

Commit 006b8a1

Browse files
authored
Update index.rst
Fix getPropertyAnnotation second argument
1 parent a3a8843 commit 006b8a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/en/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ annotations of a class. A common one is
7373
$property = $reflectionClass->getProperty('bar');
7474
7575
$reader = new AnnotationReader();
76-
$myAnnotation = $reader->getPropertyAnnotation($property, 'bar');
76+
$myAnnotation = $reader->getPropertyAnnotation($property, MyAnnotation::class);
7777
7878
echo $myAnnotation->myProperty; // result: "value"
7979

0 commit comments

Comments
 (0)