| @@ 259-263 (lines=5) @@ | ||
| 256 | } |
|
| 257 | }); |
|
| 258 | //Calculate net score using match handicap |
|
| 259 | $rounds->map(function($round) |
|
| 260 | { |
|
| 261 | $net = ($round->score - round($round->handicap)); |
|
| 262 | return $round->netScore = ($net - $round->course->par); |
|
| 263 | }); |
|
| 264 | ||
| 265 | // Sort by netScore |
|
| 266 | $rounds->sort(function($a, $b) |
|
| @@ 309-313 (lines=5) @@ | ||
| 306 | } |
|
| 307 | }); |
|
| 308 | //Calculate net score using match handicap |
|
| 309 | $rounds->map(function($round) |
|
| 310 | { |
|
| 311 | $net = ($round->score - round($round->handicap)); |
|
| 312 | return $round->netScore = ($net - $round->course->par); |
|
| 313 | }); |
|
| 314 | ||
| 315 | // Sort by netScore |
|
| 316 | $rounds->sort(function($a, $b) |
|