| Conditions | 4 |
| Paths | 5 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | 4 | protected function validateValue($value) |
|
| 35 | { |
||
| 36 | 4 | $components = parse_url($value); |
|
| 37 | 4 | foreach ($this->components as $name) { |
|
| 38 | 4 | if (!isset($components[$name])) { |
|
| 39 | 1 | return [$this->message, []]; |
|
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | 3 | if (!in_array($components[self::COMPONENT_SCHEME], $this->schemes)) { |
|
| 44 | 1 | return [$this->message, []]; |
|
| 45 | } |
||
| 46 | |||
| 47 | 2 | return null; |
|
| 48 | } |
||
| 50 |