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