Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| Field | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
| __callStatic | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php declare(strict_types=1); |
| 2 | |
| 3 | namespace Computator\FrameworkUtils\InputParser; |
| 4 | |
| 5 | class Field { |
| 6 | public static function __callStatic(string $name, array $args): Field\Base { |
| 7 | $c = __NAMESPACE__ . "\\Field\\{$name}"; |
| 8 | // try NameField if Name doesn't exist |
| 9 | if (!class_exists($c)) |
| 10 | $c .= 'Field'; |
| 11 | return new $c(...$args); |
| 12 | } |
| 13 | } |