|
@@ 195-202 (lines=8) @@
|
| 192 |
|
$lowGross[$match['player']->id] = $match['score']; |
| 193 |
|
} |
| 194 |
|
$arrayLowGross = array_keys($lowGross, min($lowGross)); |
| 195 |
|
foreach($arrayLowGross as $key => $lowgrossPlayer) { |
| 196 |
|
$grossWinner = new Grosswinner; |
| 197 |
|
$grossWinner->player_id = $lowgrossPlayer; |
| 198 |
|
$grossWinner->match_id = $matchdata['match']; |
| 199 |
|
$grossWinner->score = $lowGross[$lowgrossPlayer]; |
| 200 |
|
$grossWinner->money = $this->prizeMoney->getlowScore() / count($arrayLowGross); |
| 201 |
|
$grossWinner->save(); |
| 202 |
|
} |
| 203 |
|
|
| 204 |
|
//Calculate NET winner |
| 205 |
|
$lowNet = array(); |
|
@@ 213-220 (lines=8) @@
|
| 210 |
|
} |
| 211 |
|
$arrayLowNet = array_keys($lowNet, min($lowNet)); |
| 212 |
|
|
| 213 |
|
foreach($arrayLowNet as $key => $lownetPlayer) { |
| 214 |
|
$netWinner = new Netwinner; |
| 215 |
|
$netWinner->player_id = $lownetPlayer; |
| 216 |
|
$netWinner->match_id = $matchdata['match']; |
| 217 |
|
$netWinner->score = $lowNet[$lownetPlayer]; |
| 218 |
|
$netWinner->money = $this->prizeMoney->getlowScore() / count($arrayLowNet); |
| 219 |
|
$netWinner->save(); |
| 220 |
|
} |
| 221 |
|
|
| 222 |
|
//Calculate Skins |
| 223 |
|
|