| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 3.3332 |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | 8 | private function setCustomSniffPropertyValues(Sniff $sniff) : Sniff |
|
| 48 | { |
||
| 49 | 8 | $sniffPropertyValues = $this->sniffPropertyValueDataCollector->getForSniff($sniff); |
|
| 50 | 8 | if ($sniffPropertyValues) { |
|
|
|
|||
| 51 | foreach ($sniffPropertyValues as $property => $value) { |
||
| 52 | $sniff->$property = $value; |
||
| 53 | } |
||
| 54 | } |
||
| 55 | |||
| 56 | 8 | return $sniff; |
|
| 57 | } |
||
| 58 | } |
||
| 59 |
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.