| Conditions | 4 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | protected function beräkna_fannrätt(): array { |
||
| 21 | $fannrätt = []; |
||
| 22 | |||
| 23 | foreach ($this->oddssannolikheter as $i => $oddssannolikheter) { |
||
| 24 | $rådata = []; |
||
| 25 | foreach ($oddssannolikheter as $j => $odds) { |
||
| 26 | $streck = $this->strecksannolikheter[$i][$j]; |
||
| 27 | $res = fann_run($this->fann->fann, [$odds[0], $streck[0], $odds[1], $streck[1], $odds[2], $streck[2]]); |
||
| 28 | $rådata[] = $res[0]; |
||
| 29 | } |
||
| 30 | |||
| 31 | $utdata = $this->fann->beräkna_utdata($rådata, $this->fann->limiter); |
||
| 32 | $antal_rätt = antal_rätt($utdata, $this->tipsrader[$i]); |
||
| 33 | $fannrätt[$antal_rätt] = isset($fannrätt[$antal_rätt]) ? $fannrätt[$antal_rätt] + 1 : 1; |
||
| 34 | } |
||
| 35 | |||
| 36 | krsort($fannrätt); |
||
| 37 | return $fannrätt; |
||
| 38 | } |
||
| 40 |