| Conditions | 4 |
| Paths | 8 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4 |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 52 | 3 | public function map($method, $path, $handler) |
|
| 53 | { |
||
| 54 | 3 | $path = ($path === '/') ? $this->prefix : $this->prefix . sprintf('/%s', ltrim($path, '/')); |
|
| 55 | 3 | $route = $this->collection->map($method, $path, $handler); |
|
| 56 | |||
| 57 | 3 | $route->setParentGroup($this); |
|
| 58 | |||
| 59 | 3 | if ($host = $this->getHost()) { |
|
| 60 | 3 | $route->setHost($host); |
|
| 61 | 3 | } |
|
| 62 | |||
| 63 | 3 | if ($scheme = $this->getScheme()) { |
|
| 64 | 3 | $route->setScheme($scheme); |
|
| 65 | 3 | } |
|
| 66 | |||
| 67 | 3 | return $route; |
|
| 68 | } |
||
| 69 | } |
||
| 70 |