| Conditions | 2 |
| Paths | 2 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function getEndpoints(Model $model = null): array |
||
| 32 | { |
||
| 33 | $parameterResolver = new ParameterResolver($model, $this->defaultParameters); |
||
| 34 | |||
| 35 | $action = null; |
||
| 36 | |||
| 37 | try { |
||
| 38 | $action = action( |
||
| 39 | $this->route->getActionName(), |
||
| 40 | $parameterResolver->forRoute($this->route) |
||
| 41 | ); |
||
| 42 | } catch (UrlGenerationException $exception) { |
||
| 43 | return []; |
||
| 44 | } |
||
| 45 | |||
| 46 | return [ |
||
| 47 | $this->name ?? $this->route->getActionMethod() => [ |
||
| 48 | 'method' => $this->httpVerb ?? $this->getHttpVerbForRoute($this->route), |
||
| 49 | 'action' => $action, |
||
| 50 | ], |
||
| 51 | ]; |
||
| 52 | } |
||
| 53 | |||
| 76 |