Skip to content

Commit 68a15fd

Browse files
author
Igor Chepurnoy
committed
Update BaseEnum.php
1 parent 5786e51 commit 68a15fd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

helpers/BaseEnum.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,16 @@ public static function listData()
144144
return $result;
145145
}
146146

147-
/**
147+
/**
148148
* Get label by value
149149
* @var string value
150150
* @return string label
151151
*/
152152
public static function getLabel($value)
153153
{
154-
$list = self::listData();
154+
$list = static::$list;
155155
if (isset($list[$value])) {
156-
return Yii::t(self::$messageCategory, $list[$value]);
156+
return Yii::t(static::$messageCategory, $list[$value]);
157157
}
158158
return null;
159159
}
@@ -244,7 +244,7 @@ public function getValue()
244244
* @param string $name The name of the value.
245245
*
246246
* @return boolean If the name is valid for this type, `true` is returned.
247-
* Otherwise, the name is not valid and `false` is returned.
247+
* Otherwise, the name is not valid and `false` is returned.
248248
*/
249249
public static function isValidName($name)
250250
{
@@ -259,7 +259,7 @@ public static function isValidName($name)
259259
* @param string $value The value.
260260
*
261261
* @return boolean If the value is valid for this type, `true` is returned.
262-
* Otherwise, the value is not valid and `false` is returned.
262+
* Otherwise, the value is not valid and `false` is returned.
263263
*/
264264
public static function isValidValue($value)
265265
{

0 commit comments

Comments
 (0)