| Conditions | 4 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 8 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | 42 | public function __invoke($uri) |
|
| 34 | { |
||
| 35 | 42 | $this->assertUriObject($uri); |
|
| 36 | 42 | $modifiers = $this->getDefaultModifiers(); |
|
| 37 | 42 | $path = $uri->getPath(); |
|
| 38 | 42 | if ('' !== $uri->getScheme().$uri->getAuthority() |
|
| 39 | 42 | || (isset($path[0]) && '/' === $path[0])) { |
|
| 40 | 39 | return $modifiers->pipe(new RemoveDotSegments())->__invoke($uri); |
|
| 41 | } |
||
| 42 | |||
| 43 | 3 | return $modifiers->__invoke($uri); |
|
| 44 | } |
||
| 45 | |||
| 65 |