| Conditions | 4 |
| Paths | 6 |
| Total Lines | 30 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 1 | public function visa_genererade_rader(): void { |
|
| 22 | 1 | if (file_exists(GRAF . $this->bildfil)) { |
|
| 23 | 1 | $this->tipsgraf = $this->graf->rendera_tipsgraf($this->bildfil); |
|
| 24 | } |
||
| 25 | |||
| 26 | 1 | $radknapp = ''; |
|
| 27 | 1 | $kombinationsgraf = ''; |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Spel finns för omgången. |
||
| 31 | */ |
||
| 32 | 1 | if ($this->spelad) { |
|
| 33 | /** |
||
| 34 | * Lägg rader som sträng i request. |
||
| 35 | */ |
||
| 36 | 1 | $kod = base64_encode("{$this->mappnamn}/{$this->utdelning->spel->filnamn}.txt"); |
|
| 37 | |||
| 38 | 1 | $radknapp = t(7, "<p><a id=\"radknapp\" target=\"_blank\" href=\"/ajax/RaderAjax.php?fil=$kod\">{$this->antal_utvalda_rader} r ↗️</a></p>"); |
|
| 39 | |||
| 40 | /** |
||
| 41 | * Återskapa tipsrader i filsystemet. |
||
| 42 | */ |
||
| 43 | 1 | if (!file_exists($this->textfil)) { |
|
| 44 | 1 | $this->spara_genererade_tipsrader_fil(); |
|
| 45 | } |
||
| 46 | |||
| 47 | 1 | $kombinationsgraf = $this->kombinationsgraf('/kombinationsgraf.png', $this->bildfil); |
|
| 48 | } |
||
| 49 | |||
| 50 | 1 | $this->markup($radknapp, $kombinationsgraf); |
|
| 51 | } |
||
| 53 |