App\Transformers\ScoreTransformer::includeWeight PHP Метод

includeWeight() публичный Метод

public includeWeight ( $score )
    public function includeWeight($score)
    {
        if ($score instanceof ScoreBest === false) {
            return;
        }
        return $this->item($score, function ($score) {
            return ['percentage' => $score->weight() * 100, 'pp' => $score->weightedPp()];
        });
    }