Conditions | 5 |
Paths | 7 |
Total Lines | 21 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | private static function toArray($code, $configCode) |
||
|
|||
25 | { |
||
26 | $result = []; |
||
27 | foreach ($configCode as &$code) { |
||
28 | $key = substr($code, 0, strpos($code, ' = ')); |
||
29 | $key = str_replace('$this->', '', $key); |
||
30 | $val = substr($code, strpos($code, ' = ') + 3); |
||
31 | $val = trim(str_replace("'", '"', $val), '"'); |
||
32 | if (strtolower($val) == "true") { |
||
33 | $val = true; |
||
34 | } elseif (strtolower($val) == "false") { |
||
35 | $val = false; |
||
36 | } |
||
37 | if ($key == "") { |
||
38 | continue; |
||
39 | } |
||
40 | |||
41 | $result[$key] = $val; |
||
42 | } |
||
43 | |||
44 | return $result; |
||
45 | } |
||
46 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.