From 90f5f73e9b599b86153d330b0436e76257750e97 Mon Sep 17 00:00:00 2001 From: Yoshinari Takaoka Date: Sun, 31 Oct 2021 14:53:32 +0900 Subject: [PATCH] tweaked example code comments, [method|interface] links. --- language/enumerations.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/language/enumerations.xml b/language/enumerations.xml index 1b18b09971..9ae080d177 100644 --- a/language/enumerations.xml +++ b/language/enumerations.xml @@ -299,7 +299,7 @@ function paint(Colorful $c) { ... } paint(Suit::Clubs); // Works -print Suit::Diamonds->shape(); // prints "rectangle" +print Suit::Diamonds->shape(); // prints "Rectangle" ?> ]]> @@ -612,7 +612,7 @@ $x = Direction::Up['short']; Additionally, enum cases may not be instantiated directly with new, nor with - newInstanceWithoutConstructor in reflection. Both will result in an error. + ReflectionClass::newInstanceWithoutConstructor in reflection. Both will result in an error. @@ -632,7 +632,7 @@ $horseshoes = (new ReflectionClass(Suit::class))->newInstanceWithoutConstructor( Both Pure Enums and Backed Enums implement an internal interface named - UnitEnum. UnitEnum includes a static method + UnitEnum. UnitEnum includes a static method cases(). cases() returns a packed array of all defined Cases in the order of declaration.