Skip to content

Commit dcc17a8

Browse files
committed
Only private static methods are private by definition, fixes #25
1 parent 57d7bdb commit dcc17a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MabeEnum/Enum.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ abstract class Enum
4646
* @param scalar $value The value to select
4747
* @param int|null $ordinal
4848
*/
49-
private function __construct($value, $ordinal = null)
49+
final private function __construct($value, $ordinal = null)
5050
{
5151
$this->value = $value;
5252
$this->ordinal = $ordinal;
@@ -66,7 +66,7 @@ final public function __toString()
6666
* @throws LogicException Enums are not cloneable
6767
* because instances are implemented as singletons
6868
*/
69-
private function __clone()
69+
final private function __clone()
7070
{
7171
throw new LogicException('Enums are not cloneable');
7272
}

0 commit comments

Comments
 (0)