Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public static function create($type, $config, $negate = false) |
||
17 | { |
||
18 | $typeNs = self::formatNamespace($type); |
||
19 | if (!class_exists($typeNs) === true) { |
||
20 | throw new \InvalidArgumentException('Invalid match type: '.$type); |
||
21 | } |
||
22 | $config = (!is_array($config)) ? array($config) : $config; |
||
23 | return new $typeNs($config, $negate); |
||
24 | } |
||
25 | |||
40 | } |