Skip to content

Commit 1e25f30

Browse files
committed
Change call to method toArray() from self::toArray() to static::toArray()
1 parent 7c4cd65 commit 1e25f30

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Enum.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function __toString()
8080
*/
8181
public static function keys()
8282
{
83-
return array_keys(self::toArray());
83+
return array_keys(static::toArray());
8484
}
8585

8686
/**
@@ -92,7 +92,7 @@ public static function values()
9292
{
9393
$values = array();
9494

95-
foreach (self::toArray() as $key => $value) {
95+
foreach (static::toArray() as $key => $value) {
9696
$values[$key] = new static($value);
9797
}
9898

@@ -123,7 +123,7 @@ public static function toArray()
123123
*/
124124
public static function isValid($value)
125125
{
126-
return in_array($value, self::toArray(), true);
126+
return in_array($value, static::toArray(), true);
127127
}
128128

129129
/**
@@ -135,7 +135,7 @@ public static function isValid($value)
135135
*/
136136
public static function isValidKey($key)
137137
{
138-
$array = self::toArray();
138+
$array = static::toArray();
139139
return isset($array[$key]);
140140
}
141141

@@ -148,7 +148,7 @@ public static function isValidKey($key)
148148
*/
149149
public static function search($value)
150150
{
151-
return array_search($value, self::toArray(), true);
151+
return array_search($value, static::toArray(), true);
152152
}
153153

154154
/**

0 commit comments

Comments
 (0)