| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function detect(string $ua) |
||
| 11 | { |
||
| 12 | $this->config = $this->detector->getPatternList($this->detector->getDataProvider()->getConfig(), 'os'); |
||
| 13 | $this->resultObject = $this->detector->getResultObject()->getOs(); |
||
| 14 | $this->initResultObject(); |
||
| 15 | $this->setupResultObject(); |
||
| 16 | } |
||
| 17 | |||
| 55 | } |
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.