| Conditions | 1 |
| Paths | 1 |
| Total Lines | 28 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public static function notFound(string $uri): Http |
||
| 17 | { |
||
| 18 | $body = <<<MD |
||
| 19 | The URI `$uri` could not be find. |
||
| 20 | |||
| 21 | Please check in `site.yaml` or `routes.php`. |
||
| 22 | |||
| 23 | ``` |
||
| 24 | developmentServer: |
||
| 25 | class: Stitcher\Application\DevelopmentServer |
||
| 26 | arguments: |
||
| 27 | - '%publicDirectory%' |
||
| 28 | - '@parsePartial' |
||
| 29 | calls: |
||
| 30 | - ['setRouter', ['@router']] |
||
| 31 | - ['setMarkdownParser', ['@markdownParser']] |
||
| 32 | productionServer: |
||
| 33 | class: Stitcher\Application\ProductionServer |
||
| 34 | arguments: |
||
| 35 | - '%publicDirectory%' |
||
| 36 | calls: |
||
| 37 | - ['setRouter', ['@router']] |
||
| 38 | - ['setMarkdownParser', ['@markdownParser']] |
||
| 39 | ``` |
||
| 40 | MD; |
||
| 41 | |||
| 42 | return new self("`{$uri}` was not found.", $body, 404); |
||
| 43 | } |
||
| 44 | |||
| 50 |