Conditions | 5 |
Paths | 5 |
Total Lines | 15 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 3 |
1 | <?php |
||
26 | public function __call($name, $arguments) |
||
27 | { |
||
28 | switch ($name) { |
||
29 | case 'array': |
||
30 | return new ArrayValidator($this); |
||
31 | case 'string': |
||
32 | return new StringValidator($this); |
||
33 | case 'json': |
||
34 | return new JsonValidator($this); |
||
35 | case 'number': |
||
36 | return new NumberValidator($this); |
||
37 | default: |
||
38 | throw new \RuntimeException('Unsupported data type'); |
||
39 | } |
||
40 | } |
||
41 | } |