Example #1
0
 public function getDetailAttribute()
 {
     $value = $this->text;
     if (in_array($value, self::EVENT_TYPES, true)) {
         return ['type' => array_search_null($value, self::EVENT_TYPES)];
     } else {
         return ['type' => 'other', 'text' => $value];
     }
 }
Example #2
0
 public function getMessageTypeAttribute($value)
 {
     return array_search_null(get_int($value), static::MESSAGE_TYPES);
 }
Example #3
0
File: Game.php Project: ppy/osu-web
 public function getTeamTypeAttribute($value)
 {
     return array_search_null($value, self::TEAM_TYPES);
 }
Example #4
0
 public static function modeStr($int)
 {
     return array_search_null($int, static::MODES);
 }