| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 1 | public function tipsdata(int $u13_min = 0, int $u13_max = MAXVINST): array { |
|
| 23 | 1 | $tipsdata = []; |
|
| 24 | 1 | $sats = $this->spel->db->instans->prepare("SELECT `omgång`, `tipsrad_012` FROM `utdelning` |
|
| 25 | 1 | WHERE `tipsrad_012` AND `u13` BETWEEN :u13_min AND :u13_max ORDER BY `omgång`"); |
|
| 26 | 1 | $sats->bindValue(':u13_min', $u13_min, PDO::PARAM_INT); |
|
| 27 | 1 | $sats->bindValue(':u13_max', $u13_max, PDO::PARAM_INT); |
|
| 28 | 1 | $sats->execute(); |
|
| 29 | 1 | foreach ($sats->fetchAll(PDO::FETCH_ASSOC) as $r) { |
|
| 30 | 1 | $tipsdata[(string) $r['omgång']] = $r['tipsrad_012']; |
|
| 31 | } |
||
| 32 | 1 | return $tipsdata; |
|
| 33 | } |
||
| 35 |