| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 8 | class OutputGenerator |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var \Vaimo\ComposerPatches\Logger |
||
| 12 | */ |
||
| 13 | private $logger; |
||
| 14 | |||
| 15 | public function __construct( |
||
| 16 | \Vaimo\ComposerPatches\Logger $logger |
||
| 17 | ) { |
||
| 18 | $this->logger = $logger; |
||
| 19 | } |
||
| 20 | |||
| 21 | public function generateForException(\Exception $exception) |
||
| 45 | } |
||
| 46 | } |
||
| 48 |
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.