File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -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
+ final protected 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 @@ -245,7 +245,7 @@ public function testGetNamesConstantsNotDetected(): void
245
245
$ this ->assertSame ($ expectedNames [$ i ], $ names [$ i ]);
246
246
}
247
247
}
248
-
248
+
249
249
public function testGetOrdinals (): void
250
250
{
251
251
$ constants = EnumInheritance::getConstants ();
@@ -376,7 +376,7 @@ public function testCloneNotCallableAndThrowsLogicException(): void
376
376
377
377
$ reflectionClass = new ReflectionClass ($ enum );
378
378
$ reflectionMethod = $ reflectionClass ->getMethod ('__clone ' );
379
- $ this ->assertTrue ($ reflectionMethod ->isPrivate (), 'The method __clone must be private ' );
379
+ $ this ->assertTrue ($ reflectionMethod ->isProtected (), 'The method __clone must be protected ' );
380
380
$ this ->assertTrue ($ reflectionMethod ->isFinal (), 'The method __clone must be final ' );
381
381
382
382
$ reflectionMethod ->setAccessible (true );
@@ -432,7 +432,7 @@ public function testConstVisibility(): void
432
432
'PUB ' => ConstVisibilityEnum::PUB ,
433
433
), $ constants );
434
434
}
435
-
435
+
436
436
public function testConstVisibilityExtended (): void
437
437
{
438
438
$ constants = ConstVisibilityEnumExtended::getConstants ();
You can’t perform that action at this time.
0 commit comments