[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] [doc-en] master: Fix example
From:       魔王卷子 via GitHub <noreply () php ! net>
Date:       2022-10-23 14:33:11
Message-ID: M4nHrPXvuNh4YvWVmUSSPL4cdwYL12iKiP4DH3vLh4 () main ! php ! net
[Download RAW message or body]

Author: 魔王卷子 (mowangjuanzi)
Committer: GitHub (web-flow)
Pusher: cmb69
Date: 2022-10-23T16:23:14+02:00

Commit: https://github.com/php/doc-en/commit/e23a1375a572a50173768053ebdaac8ac91da9eb
Raw diff: https://github.com/php/doc-en/commit/e23a1375a572a50173768053ebdaac8ac91da9eb.diff


Fix example

Closes GH-1910.

Changed paths:
  M  reference/reflection/reflectionclass/getattributes.xml


Diff:

diff --git a/reference/reflection/reflectionclass/getattributes.xml \
b/reference/reflection/reflectionclass/getattributes.xml index \
                8b00e3970fd..070cf35a9ad 100644
--- a/reference/reflection/reflectionclass/getattributes.xml
+++ b/reference/reflection/reflectionclass/getattributes.xml
@@ -147,7 +147,7 @@ class Fruit {
 }
 
 #[Attribute]
-class Red implements Colour {
+class Red implements Color {
 }
 
 #[Fruit]
@@ -156,7 +156,7 @@ class Apple {
 }
 
 $class = new ReflectionClass('Apple');
-$attributes = $class->getAttributes('Colour', ReflectionAttribute::IS_INSTANCEOF);
+$attributes = $class->getAttributes(Color::class, \
ReflectionAttribute::IS_INSTANCEOF);  print_r(array_map(fn($attribute) => \
$attribute->getName(), $attributes));  ?>
 ]]>

-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic