| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 446 | public static function of(string $type): SpecificationInterface |
|
| 23 | { |
||
| 24 | 446 | if (\function_exists('is_'.$type)) { |
|
| 25 | 410 | return new PrimitiveType($type); |
|
| 26 | } |
||
| 27 | |||
| 28 | 200 | if ($type === 'variable') { |
|
| 29 | 4 | return new VariableType; |
|
| 30 | } |
||
| 31 | |||
| 32 | 198 | if ($type === 'mixed') { |
|
| 33 | 2 | return new MixedType; |
|
| 34 | } |
||
| 35 | |||
| 36 | 198 | return new ClassType($type); |
|
| 37 | } |
||
| 71 |