Skip to content

Commit

Permalink
Update BaseEnum.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Chepurnoy committed Sep 23, 2015
1 parent 5786e51 commit 68a15fd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions helpers/BaseEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ public static function listData()
return $result;
}

/**
/**
* Get label by value
* @var string value
* @return string label
*/
public static function getLabel($value)
{
$list = self::listData();
$list = static::$list;
if (isset($list[$value])) {
return Yii::t(self::$messageCategory, $list[$value]);
return Yii::t(static::$messageCategory, $list[$value]);
}
return null;
}
Expand Down Expand Up @@ -244,7 +244,7 @@ public function getValue()
* @param string $name The name of the value.
*
* @return boolean If the name is valid for this type, `true` is returned.
* Otherwise, the name is not valid and `false` is returned.
* Otherwise, the name is not valid and `false` is returned.
*/
public static function isValidName($name)
{
Expand All @@ -259,7 +259,7 @@ public static function isValidName($name)
* @param string $value The value.
*
* @return boolean If the value is valid for this type, `true` is returned.
* Otherwise, the value is not valid and `false` is returned.
* Otherwise, the value is not valid and `false` is returned.
*/
public static function isValidValue($value)
{
Expand Down

0 comments on commit 68a15fd

Please sign in to comment.