Total Complexity | 3 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | final class EdifactParser |
||
12 | { |
||
13 | /** @var CustomSegmentFactoryInterface|null */ |
||
14 | private $customSegmentsFactory; |
||
15 | |||
16 | 4 | public function __construct(?CustomSegmentFactoryInterface $customSegmentsFactory = null) |
|
19 | 4 | } |
|
20 | |||
21 | 4 | public function parse(string $fileContent): TransactionResult |
|
35 |
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.