Total Complexity | 6 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | trait AsPageSetting |
||
13 | { |
||
14 | 2 | public function fields(NovaRequest $request): array |
|
15 | { |
||
16 | 2 | if (!($request instanceof ResourceIndexRequest)) { |
|
17 | /** @var SettingsTemplate $template */ |
||
18 | 1 | $templateModel = $request->model()->find($request->route('resourceId')); |
|
19 | 1 | if ($templateModel && ($template = $templateModel->template())) { |
|
20 | 1 | return $template->fields($request); |
|
21 | } |
||
22 | } |
||
23 | |||
24 | |||
25 | 1 | return $this->fieldsOnIndex($request); |
|
26 | } |
||
27 | |||
28 | 1 | public function fieldsOnIndex(ResourceIndexRequest $request) |
|
33 | 1 | ]; |
|
34 | } |
||
35 | |||
36 | 2 | public static function newModel() |
|
41 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.