| Conditions | 2 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 2 | public function run(): string |
|
| 33 | { |
||
| 34 | 2 | $uri = $this->uri ?? $_SERVER['SCRIPT_NAME']; |
|
| 35 | |||
| 36 | 2 | $this->partialParse->setFilter($uri); |
|
| 37 | 2 | $this->partialParse->execute(); |
|
| 38 | |||
| 39 | 2 | $filename = ltrim($uri === '/' ? 'index.html' : "{$uri}.html", '/'); |
|
| 40 | |||
| 41 | 2 | return @file_get_contents("{$this->rootDirectory}/{$filename}"); |
|
| 42 | } |
||
| 43 | } |
||
| 44 |