| Total Complexity | 6 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 86.67% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | final class WithKeyword implements Component |
||
| 15 | { |
||
| 16 | /** @var string */ |
||
| 17 | public $name; |
||
| 18 | |||
| 19 | /** @var ArrayObj[] */ |
||
| 20 | public $columns = []; |
||
| 21 | |||
| 22 | /** @var Parser|null */ |
||
| 23 | public $statement; |
||
| 24 | |||
| 25 | 50 | public function __construct(string $name) |
|
| 26 | { |
||
| 27 | 50 | $this->name = $name; |
|
| 28 | } |
||
| 29 | |||
| 30 | 12 | public function build(): string |
|
| 51 | } |
||
| 52 | |||
| 53 | public function __toString(): string |
||
| 58 |
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.