| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 1 | protected function oddssummor(): array { |
|
| 21 | 1 | $oddssumma_utfall = 0.0; |
|
| 22 | 1 | $oddssumma_min = 0.0; |
|
| 23 | 1 | $oddssumma_max = 0.0; |
|
| 24 | |||
| 25 | 1 | foreach ($this->tips->odds->sannolikheter as $k => $odds) { |
|
| 26 | 1 | if ($this->tips->utdelning->tipsrad_012) { |
|
| 27 | 1 | $oddssumma_utfall += $odds[$this->tips->utdelning->tipsrad_012[$k]]; |
|
| 28 | } |
||
| 29 | |||
| 30 | 1 | $oddssumma_min += ne_min($odds); |
|
| 31 | 1 | $oddssumma_max += ne_max($odds); |
|
| 32 | } |
||
| 33 | |||
| 34 | 1 | return [ |
|
| 35 | 1 | round($oddssumma_min, 2), |
|
| 36 | 1 | round($oddssumma_max, 2), |
|
| 37 | 1 | round($oddssumma_utfall, 2) |
|
| 38 | 1 | ]; |
|
| 41 |