Esempio n. 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];
     }
 }
Esempio n. 2
0
 public function getMessageTypeAttribute($value)
 {
     return array_search_null(get_int($value), static::MESSAGE_TYPES);
 }
Esempio n. 3
0
File: Game.php Progetto: ppy/osu-web
 public function getTeamTypeAttribute($value)
 {
     return array_search_null($value, self::TEAM_TYPES);
 }
Esempio n. 4
0
 public static function modeStr($int)
 {
     return array_search_null($int, static::MODES);
 }