| Conditions | 4 | 
| Paths | 8 | 
| Total Lines | 16 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 20 | public function toArray(): array | ||
| 21 |     { | ||
| 22 | $isRunnable = ($this->solution instanceof RunnableSolution); | ||
| 23 | |||
| 24 | return [ | ||
| 25 | 'class' => get_class($this->solution), | ||
| 26 | 'title' => $this->solution->getSolutionTitle(), | ||
| 27 | 'description' => $this->solution->getSolutionDescription(), | ||
| 28 | 'links' => $this->solution->getDocumentationLinks(), | ||
| 29 | 'is_runnable' => $isRunnable, | ||
| 30 | 'run_button_text' => $isRunnable ? $this->solution->getRunButtonText() : '', | ||
| 31 | 'run_parameters' => $isRunnable ? $this->solution->getRunParameters() : [], | ||
| 32 | 'action_description' => $isRunnable ? $this->solution->getSolutionActionDescription() : '', | ||
| 33 | 'execute_endpoint' => $this->executeEndpoint(), | ||
| 34 | ]; | ||
| 35 | } | ||
| 36 | |||
| 46 |