| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | protected static function getWantedType(string $fieldName): TypeUtilInterface |
||
| 21 | { |
||
| 22 | if (!preg_match('/^[a-zA-Z0-9\.\-_]+$/', $fieldName)) { |
||
| 23 | throw new InvalidKeyException($fieldName, null); |
||
| 24 | } |
||
| 25 | return new Compound( |
||
| 26 | $fieldName, |
||
| 27 | new AnotherValueObject($fieldName, Header::class), |
||
| 28 | new AnotherValueObject($fieldName, Reference::class), |
||
| 29 | new StringLiteral($fieldName) |
||
| 30 | ); |
||
| 33 |