File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ abstract class Enum
29
29
*
30
30
* @var array
31
31
*/
32
- private static $ cache = array ();
32
+ protected static $ cache = array ();
33
33
34
34
/**
35
35
* Creates a new value of some type
@@ -62,7 +62,7 @@ public function getValue()
62
62
*/
63
63
public function getKey ()
64
64
{
65
- return self ::search ($ this ->value );
65
+ return static ::search ($ this ->value );
66
66
}
67
67
68
68
/**
@@ -107,12 +107,12 @@ public static function values()
107
107
public static function toArray ()
108
108
{
109
109
$ class = get_called_class ();
110
- if (!array_key_exists ($ class , self ::$ cache )) {
110
+ if (!array_key_exists ($ class , static ::$ cache )) {
111
111
$ reflection = new \ReflectionClass ($ class );
112
- self ::$ cache [$ class ] = $ reflection ->getConstants ();
112
+ static ::$ cache [$ class ] = $ reflection ->getConstants ();
113
113
}
114
114
115
- return self ::$ cache [$ class ];
115
+ return static ::$ cache [$ class ];
116
116
}
117
117
118
118
/**
You can’t perform that action at this time.
0 commit comments