File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ abstract class Enum
60
60
* @param null|bool|int|float|string|array<mixed> $value The value of the enumerator
61
61
* @param int|null $ordinal The ordinal number of the enumerator
62
62
*/
63
- final private function __construct ($ value , $ ordinal = null )
63
+ private function __construct ($ value , $ ordinal = null )
64
64
{
65
65
$ this ->value = $ value ;
66
66
$ this ->ordinal = $ ordinal ;
@@ -81,7 +81,7 @@ public function __toString(): string
81
81
* @throws LogicException Enums are not cloneable
82
82
* because instances are implemented as singletons
83
83
*/
84
- final private function __clone ()
84
+ private function __clone ()
85
85
{
86
86
throw new LogicException ('Enums are not cloneable ' );
87
87
}
Original file line number Diff line number Diff line change @@ -377,7 +377,6 @@ public function testCloneNotCallableAndThrowsLogicException(): void
377
377
$ reflectionClass = new ReflectionClass ($ enum );
378
378
$ reflectionMethod = $ reflectionClass ->getMethod ('__clone ' );
379
379
$ this ->assertTrue ($ reflectionMethod ->isPrivate (), 'The method __clone must be private ' );
380
- $ this ->assertTrue ($ reflectionMethod ->isFinal (), 'The method __clone must be final ' );
381
380
382
381
$ reflectionMethod ->setAccessible (true );
383
382
$ this ->expectException (LogicException::class);
You can’t perform that action at this time.
0 commit comments