| Total Complexity | 5 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | final class ShortCircuit implements QueueInterface |
||
| 18 | { |
||
| 19 | /** @var int */ |
||
| 20 | private $id = 0; |
||
| 21 | |||
| 22 | /** @var HandlerRegistryInterface */ |
||
| 23 | private $registry; |
||
| 24 | |||
| 25 | /** @var SerializerRegistryInterface */ |
||
| 26 | private $serializerRegistry; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param HandlerRegistryInterface $registry |
||
| 30 | */ |
||
| 31 | public function __construct(HandlerRegistryInterface $registry, SerializerRegistryInterface $serializerRegistry) |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @inheritdoc |
||
| 39 | */ |
||
| 40 | public function push(string $jobType, array $payload = [], Options $options = null): string |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param string $jobType |
||
| 56 | * @param array $payload |
||
| 57 | * @return string |
||
| 58 | */ |
||
| 59 | private function serialize(string $jobType, array $payload): string |
||
| 64 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
integervalues, zero is a special case, in particular the following results might be unexpected: