| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 46 | public function getPathSegment($name) |
||
| 47 | { |
||
| 48 | if (!isset($this->pathSegments[$name])) { |
||
| 49 | throw new \InvalidArgumentException( |
||
| 50 | sprintf( |
||
| 51 | 'Unknown path segment "%s". Known path segments: "%s"', |
||
| 52 | $name, |
||
| 53 | implode('", "', array_keys($this->pathSegments)) |
||
| 54 | ) |
||
| 55 | ); |
||
| 56 | } |
||
| 57 | |||
| 58 | $name = $this->pathSegments[$name]; |
||
| 59 | |||
| 60 | return $name; |
||
| 61 | } |
||
| 62 | } |
||
| 63 |