1 | <?php |
||
24 | class MessageManagerBackendDispatcher extends QueueBackendDispatcher |
||
25 | { |
||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $dedicatedTypes = []; |
||
30 | |||
31 | /** |
||
32 | * @var BackendInterface |
||
33 | */ |
||
34 | protected $default; |
||
35 | |||
36 | /** |
||
37 | * @param MessageManagerInterface $messageManager Only used in compiler pass |
||
38 | * @param string $defaultQueue |
||
39 | */ |
||
40 | public function __construct(MessageManagerInterface $messageManager, array $queues, $defaultQueue, array $backends) |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function getBackend($type) |
||
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | public function getIterator(): void |
||
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | public function handle(MessageInterface $message, EventDispatcherInterface $dispatcher): void |
||
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | public function getStatus() |
||
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public function cleanup(): void |
||
110 | |||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | public function initialize(): void |
||
117 | |||
118 | /** |
||
119 | * @return BackendInterface |
||
120 | */ |
||
121 | protected function getDefaultBackend() |
||
135 | } |
||
136 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVar
assignment in line 1 and the$higher
assignment in line 2 are dead. The first because$myVar
is never used and the second because$higher
is always overwritten for every possible time line.