| Conditions | 5 |
| Paths | 12 |
| Total Lines | 13 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 5.0342 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 21 | 4 | public function handle($context, $options) |
|
| 22 | { |
||
| 23 | 4 | $options = isset($options['hash']) ? $options['hash'] : []; |
|
| 24 | 4 | $relative = isset($options['relative']) ? $options['relative'] : false; |
|
| 25 | 4 | switch ($this->type) { |
|
| 26 | 4 | case 'path': |
|
| 27 | 2 | return $this->getPath($context, $options, $relative); |
|
| 28 | 2 | case 'url': |
|
| 29 | 2 | return $this->getUrl($context, $options, $relative); |
|
| 30 | default: |
||
| 31 | throw new \InvalidArgumentException(); |
||
| 32 | } |
||
| 33 | } |
||
| 34 | |||
| 45 |