| 1 | <?php |
||
| 7 | final class ChainedStrategy implements QueueProducerStrategyInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var QueueProducerStrategyInterface[] |
||
| 11 | */ |
||
| 12 | private $strategies; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param QueueProducerStrategyInterface[] $strategies |
||
| 16 | */ |
||
| 17 | 3 | public function __construct(array $strategies = []) |
|
| 21 | |||
| 22 | 1 | public function addStrategy(QueueProducerStrategyInterface $strategy): self |
|
| 28 | |||
| 29 | 3 | public function produceQueues($command): array |
|
| 43 | } |
||
| 44 |
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.