Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
35 | public static function createFromString($filters, $delimiter = ',') { |
||
36 | $include = null; |
||
37 | $exclude = null; |
||
38 | |||
39 | |||
40 | $fixerNames = explode($delimiter, $filters); |
||
41 | $fixerNames = array_map('trim', $fixerNames); |
||
42 | $fixerNames = array_filter($fixerNames); |
||
43 | |||
44 | foreach ($fixerNames as $name) { |
||
45 | if (strpos($name, '-') === 0) { |
||
46 | $exclude[] = substr($name, 1); |
||
47 | } else { |
||
48 | $include[] = $name; |
||
49 | } |
||
50 | } |
||
51 | |||
52 | return new self($include, $exclude); |
||
53 | } |
||
54 | |||
76 | } |