| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 72 | private function validate(string $flag): void |
||
| 73 | { |
||
| 74 | if ($flag === '') { |
||
| 75 | throw new \InvalidArgumentException('Flag string is empty'); |
||
| 76 | } |
||
| 77 | |||
| 78 | if (isset(self::RFC_3501_FIXED[$flag])) { |
||
| 79 | return; |
||
| 80 | } |
||
| 81 | |||
| 82 | if ($flag[0] === '\\') { |
||
| 83 | $this->validateAtom(substr($flag, 1)); |
||
| 84 | } else { |
||
| 85 | $this->validateAtom($flag); |
||
| 86 | } |
||
| 87 | } |
||
| 88 | |||
| 100 | } |