1 | <?php |
||
15 | final class Configuration implements ConfigurationInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var MultiCsFileLoaderInterface |
||
19 | */ |
||
20 | private $multiCsFileLoader; |
||
21 | |||
22 | /** |
||
23 | * @var SniffNamingInterface |
||
24 | */ |
||
25 | private $sniffNaming; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | private $multiCsFile; |
||
31 | |||
32 | 11 | public function __construct(MultiCsFileLoaderInterface $multiCsFileLoader, SniffNamingInterface $sniffNaming) |
|
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | 8 | public function getActiveSniffs() |
|
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | 8 | public function getActiveStandards() |
|
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | 4 | public function getExcludedSniffs() |
|
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | 1 | public function getActiveFixers() |
|
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | 1 | public function getExcludedFixers() |
|
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | 1 | public function getActiveFixerLevels() |
|
113 | |||
114 | /** |
||
115 | * @return array |
||
116 | */ |
||
117 | 11 | private function getMultiCsFile() |
|
127 | |||
128 | /** |
||
129 | * @return string[] |
||
130 | */ |
||
131 | 1 | private function getFixerLevels() |
|
135 | |||
136 | /** |
||
137 | * @throws \Exception |
||
138 | */ |
||
139 | 1 | private function ensureLevelsAreValid(array $fixerLevels) |
|
153 | } |
||
154 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.