| Conditions | 2 |
| Paths | 2 |
| Total Lines | 30 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function catchAll(...$args) : object |
||
|
|
|||
| 30 | { |
||
| 31 | $pages = [ |
||
| 32 | "" => "index", |
||
| 33 | "di" => "di", |
||
| 34 | "request" => "request", |
||
| 35 | "router" => "router", |
||
| 36 | "session" => "session", |
||
| 37 | "session/increment" => "session_increment", |
||
| 38 | "session/destroy" => "session_destroy", |
||
| 39 | "view" => "view", |
||
| 40 | ]; |
||
| 41 | |||
| 42 | $path = $this->di->get("router")->getMatchedPath(); |
||
| 43 | |||
| 44 | if (!array_key_exists($path, $pages)) { |
||
| 45 | throw new NotFoundException("No such page '$path' in the development controller."); |
||
| 46 | } |
||
| 47 | |||
| 48 | $page = $this->di->get("page"); |
||
| 49 | $page->add( |
||
| 50 | "anax/v2/dev/{$pages[$path]}", |
||
| 51 | [ |
||
| 52 | "mount" => "dev/" |
||
| 53 | ] |
||
| 54 | ); |
||
| 55 | |||
| 56 | return $page->render([ |
||
| 57 | "title" => ucfirst($pages[$path]), |
||
| 58 | "baseTitle" => " | Anax development utilities" |
||
| 59 | ]); |
||
| 62 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.