@@ -169,7 +169,7 @@ |
||
| 169 | 169 | $query->setParameter('rank', $i); |
| 170 | 170 | $result = $query->getResult(); |
| 171 | 171 | foreach ($result as $row) { |
| 172 | - $data["gameRank$i"][$row['idPlayer']] = (int) $row['nb']; |
|
| 172 | + $data["gamerank$i"][$row['idPlayer']] = (int) $row['nb']; |
|
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | if ($previousLibValue === $libValue) { |
| 73 | 73 | ++$nbEqual; |
| 74 | 74 | } else { |
| 75 | - $rank += $nbEqual; |
|
| 75 | + $rank += $nbEqual; |
|
| 76 | 76 | $nbEqual = 1; |
| 77 | 77 | $playerChartEqual = []; |
| 78 | 78 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $playerChart |
| 83 | 83 | ->setNbEqual($nbEqual) |
| 84 | 84 | ->setRank($rank) |
| 85 | - ->setPointChart((int)( |
|
| 85 | + ->setPointChart((int) ( |
|
| 86 | 86 | array_sum( |
| 87 | 87 | array_slice(array_values($pointsChart), $playerChart->getRank() - 1, $playerChart->getNbEqual()) |
| 88 | 88 | ) / $playerChart->getNbEqual() |
@@ -137,20 +137,20 @@ discard block |
||
| 137 | 137 | { |
| 138 | 138 | $liste = []; |
| 139 | 139 | $pointRecord = 100 * $iNbPartcipant; |
| 140 | - $nb = 80;// % différence entre deux positions |
|
| 141 | - $compteur = 0;// compteur de position |
|
| 140 | + $nb = 80; // % différence entre deux positions |
|
| 141 | + $compteur = 0; // compteur de position |
|
| 142 | 142 | |
| 143 | 143 | // 1er |
| 144 | 144 | $liste[1] = $pointRecord; |
| 145 | 145 | |
| 146 | 146 | for ($i = 2; $i <= $iNbPartcipant; $i++) { |
| 147 | - $pointRecord = (int)($pointRecord * $nb / 100); |
|
| 147 | + $pointRecord = (int) ($pointRecord * $nb / 100); |
|
| 148 | 148 | $liste[$i] = $pointRecord; |
| 149 | 149 | $compteur++; |
| 150 | 150 | |
| 151 | 151 | if ($nb < 85) { |
| 152 | 152 | if ($compteur === 2) { |
| 153 | - $nb++;// le % augmente donc la différence diminue |
|
| 153 | + $nb++; // le % augmente donc la différence diminue |
|
| 154 | 154 | $compteur = 0; |
| 155 | 155 | } |
| 156 | 156 | } elseif ($nb < 99) { |
@@ -212,12 +212,12 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | //If firsts |
| 214 | 214 | if ($aArray[$i][$nameRankCol] == 1) { |
| 215 | - $aArray[$i][$sNameNewCol] = (int)round($f, 0); |
|
| 215 | + $aArray[$i][$sNameNewCol] = (int) round($f, 0); |
|
| 216 | 216 | continue; |
| 217 | 217 | } |
| 218 | 218 | //If non equals |
| 219 | 219 | if ($aArray[$i][$nameEqualCol] == 1) { |
| 220 | - $aArray[$i][$sNameNewCol] = (int)round($aF[$aArray[$i][$nameRankCol]], 0); |
|
| 220 | + $aArray[$i][$sNameNewCol] = (int) round($aF[$aArray[$i][$nameRankCol]], 0); |
|
| 221 | 221 | continue; |
| 222 | 222 | } |
| 223 | 223 | //If equals (do average of players gives if they weren't tied) |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | } |
| 228 | 228 | $value = round(array_sum($aTiedValues) / count($aTiedValues), 0); |
| 229 | 229 | for ($j = $i, $nb = $i + count($aTiedValues); $j < $nb; ++$j) { |
| 230 | - $aArray[$i][$sNameNewCol] = (int)$value; |
|
| 230 | + $aArray[$i][$sNameNewCol] = (int) $value; |
|
| 231 | 231 | $i++; |
| 232 | 232 | } |
| 233 | 233 | $i--; |