Conditions | 5 |
Paths | 7 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
50 | private function setSniffProperty(string $sniffCode, string $name, $value) |
||
51 | { |
||
52 | if (isset($sniffs[$sniffCode]) === false) { |
||
53 | return; |
||
54 | } |
||
55 | |||
56 | $name = trim($name); |
||
57 | if (is_string($value)) { |
||
58 | $value = trim($value); |
||
59 | } |
||
60 | |||
61 | // Special case for booleans. |
||
62 | if ($value === 'true') { |
||
63 | $value = true; |
||
64 | } elseif ($value === 'false') { |
||
65 | $value = false; |
||
66 | } |
||
67 | |||
68 | $sniffs[$sniffCode]->$name = $value; |
||
69 | } |
||
70 | } |
||
71 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.