Inheritance: extends Model
Example #1
0
 public function transform(Models\UserStatistics\Model $stats = null)
 {
     if ($stats === null) {
         $stats = new UserStatistics\Osu([], false);
     }
     return ['count300' => $stats->count300, 'count100' => $stats->count100, 'count50' => $stats->count50, 'playcount' => $stats->playcount, 'ranked_score' => $stats->ranked_score, 'total_score' => $stats->total_score, 'pp_rank' => $stats->rank_score_index, 'level' => $stats->level, 'pp_raw' => $stats->rank_score, 'accuracy' => $stats->accuracy_new, 'count_rank_ss' => $stats->x_rank_count, 'count_rank_s' => $stats->s_rank_count, 'count_rank_a' => $stats->a_rank_count, 'pp_country_rank' => $stats->countryRank()];
 }
 public function transform(UserStatistics\Model $stats = null)
 {
     if ($stats === null) {
         $stats = new UserStatistics\Osu();
     }
     return ['rank' => ['isRanked' => $stats->rank_score_index > 0, 'global' => $stats->rank_score_index, 'country' => $stats->countryRank()], 'level' => ['current' => $stats->currentLevel(), 'progress' => $stats->currentLevelProgressPercent()], 'rankedScore' => $stats->ranked_score, 'hitAccuracy' => $stats->accuracy_new, 'playCount' => $stats->playcount, 'totalScore' => $stats->total_score, 'totalHits' => $stats->totalHits(), 'maximumCombo' => $stats->max_combo, 'replaysWatchedByOthers' => $stats->replay_popularity, 'scoreRanks' => ['X' => $stats->x_rank_count, 'S' => $stats->s_rank_count, 'A' => $stats->a_rank_count]];
 }
 public function transform(UserStatistics\Model $stats = null)
 {
     if ($stats === null) {
         $stats = new UserStatistics\Osu();
     }
     return ["rank" => ["isRanked" => $stats->rank_score_index > 0, "global" => $stats->rank_score_index, "country" => $stats->countryRank()], "level" => ["current" => $stats->currentLevel(), "progress" => $stats->currentLevelProgressPercent()], "rankedScore" => $stats->ranked_score, "hitAccuracy" => $stats->accuracy_new, "playCount" => $stats->playcount, "totalScore" => $stats->total_score, "totalHits" => $stats->totalHits(), "maximumCombo" => $stats->max_combo, "replaysWatchedByOthers" => $stats->replay_popularity, "scoreRanks" => ["ss" => $stats->x_rank_count, "s" => $stats->s_rank_count, "a" => $stats->a_rank_count]];
 }