| Conditions | 2 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0185 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | 10 | public function normalizeAction($actions): array |
|
| 13 | { |
||
| 14 | $addNamespace = function ($action) { |
||
| 15 | 10 | if ($action = ltrim($action, '\\')) { |
|
| 16 | 10 | return $action; |
|
| 17 | } |
||
| 18 | |||
| 19 | return app()->getNamespace().'\\Http\\Controllers\\'.$action; |
||
|
|
|||
| 20 | 10 | }; |
|
| 21 | |||
| 22 | 10 | return array_map($addNamespace, $actions); |
|
| 23 | } |
||
| 45 |