Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | final class ParameterCommandDiscriminator implements CommandDiscriminator |
||
19 | { |
||
20 | /** |
||
21 | * Command parameter name. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | private $parameter; |
||
26 | |||
27 | /** |
||
28 | * Expected command parameter value. |
||
29 | * |
||
30 | * @var mixed|null |
||
31 | */ |
||
32 | private $value; |
||
33 | |||
34 | /** |
||
35 | * ParameterCommandDiscriminator constructor. |
||
36 | * |
||
37 | * @param string $parameter |
||
38 | * @param mixed|null $value |
||
39 | */ |
||
40 | public function __construct(string $parameter, $value = null) |
||
41 | { |
||
42 | $this->parameter = $parameter; |
||
43 | $this->value = $value; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function shouldEnqueue(Command $command): bool |
||
53 | } |
||
54 | } |
||
55 |