| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public static function createConstraint(string $name, string $value, string $match): Constraint |
||
| 24 | { |
||
| 25 | $parts = explode("-", $name); |
||
| 26 | $className = implode("", array_map(function ($part) { |
||
| 27 | return ucfirst($part);//overridden function |
||
| 28 | }, $parts)); |
||
| 29 | $className = self::NAMESPACE_CONSTRAINTS . $className; |
||
| 30 | |||
| 31 | if (!class_exists($className)) { |
||
| 32 | throw new ClassNotFoundException($className); |
||
| 33 | } |
||
| 34 | return new $className($value, $match); |
||
| 35 | } |
||
| 37 |