| Conditions | 2 |
| Paths | 2 |
| Total Lines | 26 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | protected function fanndata(): string { |
||
| 27 | $fanndata = ''; |
||
| 28 | $this->logg = $this->db_preferenser->hämta_preferens('fann.status'); |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Rendera data om FANN-anslutning. |
||
| 32 | */ |
||
| 33 | if ($this->exists_fann) { |
||
| 34 | $fanndata = <<< EOT |
||
| 35 | <div id="fannlogg"><em>{$this->logg}</em></div> |
||
| 36 | <div> |
||
| 37 | <p>FANN <strong>{$this->eka((string) phpversion("fann"))}</strong>:</p> |
||
| 38 | <p>Nätverkstyp: {$this->eka((string) fann_get_network_type($this->fann))}<br> |
||
| 39 | In: {$this->eka((string) fann_get_num_input($this->fann))}<br> |
||
| 40 | Ut: {$this->eka((string) fann_get_num_output($this->fann))}<br> |
||
| 41 | Lager: {$this->eka((string) fann_get_num_layers($this->fann))}<br> |
||
| 42 | Anslutningar: {$this->eka((string) fann_get_total_connections($this->fann))}<br> |
||
| 43 | Neuroner: {$this->eka((string) fann_get_total_neurons($this->fann))}<br> |
||
| 44 | </div> |
||
| 45 | <form method="post" action="/#modulflikar-FANN"> |
||
| 46 | <p><button name="generera_fann">Träna FANN</button></p> |
||
| 47 | </form> |
||
| 48 | EOT; |
||
| 49 | } |
||
| 50 | |||
| 51 | return $fanndata; |
||
| 52 | } |
||
| 54 |