1 | <?php declare(strict_types=1); |
||
14 | final class BunnyManager |
||
15 | { |
||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | private $config = []; |
||
20 | |||
21 | /** |
||
22 | * @var bool |
||
23 | */ |
||
24 | private $isDeclared = FALSE; |
||
25 | |||
26 | /** |
||
27 | * @var Container |
||
28 | */ |
||
29 | private $container; |
||
30 | |||
31 | /** |
||
32 | * @var LoopInterface |
||
33 | */ |
||
34 | private $loop; |
||
35 | |||
36 | /** |
||
37 | * @var Client|AsyncClient|null |
||
38 | */ |
||
39 | private $client; |
||
40 | |||
41 | /** |
||
42 | * @var Channel|PromiseInterface|null |
||
43 | */ |
||
44 | private $channel; |
||
45 | |||
46 | 4 | public function __construct(Container $container, array $config) |
|
51 | |||
52 | 1 | public function setLoop(LoopInterface $loop): void |
|
56 | |||
57 | /** |
||
58 | * @return Client|AsyncClient |
||
59 | */ |
||
60 | 2 | public function getClient() |
|
72 | |||
73 | /** |
||
74 | * @return Channel|PromiseInterface |
||
75 | */ |
||
76 | public function getChannel() |
||
84 | |||
85 | 1 | public function getClassNameByAlias(string $alias): ?string |
|
89 | |||
90 | /** |
||
91 | * @return bool|PromiseInterface |
||
92 | */ |
||
93 | public function declare() |
||
119 | |||
120 | /** |
||
121 | * @return Channel|PromiseInterface |
||
122 | */ |
||
123 | private function createChannel() |
||
139 | |||
140 | private function declareExchanges(Channel $channel): void |
||
154 | |||
155 | private function declareQueues(Channel $channel): void |
||
163 | } |
||
164 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.