$o) { $expected = 1 / (1 + 10 ** (($o - $elo) / 400)); $r = $this->K * ($s[$idx] - $expected); $eloNew += $r; } return [ 'elo' => (int) \max((int) $eloNew, $this->MIN_ELO), ]; } }