Conditions | 4 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function decorateSniffsWithCustomRules(array $sniffs) |
||
28 | { |
||
29 | // todo: put to SniffDispatcher on sniff loading? |
||
30 | $ruleset = $this->rulesetBuilder->getRuleset(); |
||
31 | |||
32 | foreach ($sniffs as $sniffCode => $sniffObject) { |
||
33 | if (!isset($ruleset[$sniffCode]['properties'])) { |
||
34 | continue; |
||
35 | } |
||
36 | |||
37 | foreach ($ruleset[$sniffCode]['properties'] as $name => $value) { |
||
38 | $this->setSniffProperty($sniffCode, $name, $value); |
||
39 | } |
||
40 | } |
||
41 | } |
||
42 | |||
69 |
This check looks for calls to
isset(...)
orempty()
on variables that are yet undefined. These calls will always produce the same result and can be removed.This is most likely caused by the renaming of a variable or the removal of a function/method parameter.