| Total Complexity | 6 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class phpValidator extends ConstraintValidator |
||
| 13 | { |
||
| 14 | public function validate($value, Constraint $constraint) |
||
| 15 | { |
||
| 16 | if (trim($value) == '') { |
||
| 17 | return; |
||
| 18 | } |
||
| 19 | if ($error = self::lint($value)) { |
||
| 20 | $this->context |
||
| 21 | ->buildViolation($error) |
||
| 22 | ->addViolation(); |
||
| 23 | } |
||
| 24 | } |
||
| 25 | |||
| 26 | public static function lint(string $input) : ?string |
||
| 45 | } |
||
| 46 | } |
||
| 47 |