1 | <?php |
||
6 | class AMQP extends Base implements Iface |
||
7 | { |
||
8 | private $conn; |
||
9 | private $queues = array(); |
||
10 | |||
11 | |||
12 | /** |
||
13 | * Initializes the message queue object |
||
14 | * |
||
15 | * @param array $config Associative list of configuration key/value pairs |
||
16 | */ |
||
17 | public function __construct( array $config ) |
||
50 | |||
51 | |||
52 | /** |
||
53 | * Closes the open connection |
||
54 | */ |
||
55 | public function __destruct() |
||
59 | |||
60 | |||
61 | /** |
||
62 | * Returns the queue for the given name |
||
63 | * |
||
64 | * @param string $name Queue name |
||
65 | * @return \Aimeos\MW\MQueue\Queue\Iface Message queue |
||
66 | */ |
||
67 | public function getQueue( $name ) |
||
82 | |||
83 | |||
84 | /** |
||
85 | * Opens a connection to the message queue server |
||
86 | * |
||
87 | * @param string $host Host name or IP address |
||
88 | * @param integer $port Port the server is listening |
||
89 | * @param string $user User name for authentication |
||
90 | * @param string $pass Password for authentication |
||
91 | * @return \PhpAmqpLib\Connection\AMQPStreamConnection|\PhpAmqpLib\Exception\AMQPException |
||
92 | */ |
||
93 | protected function connect( $host, $port, $user, $pass ) |
||
119 | |||
120 | |||
121 | /** |
||
122 | * Returns a new AMQP channel |
||
123 | * |
||
124 | * @return \PhpAmqpLib\Connection\AMQPChannel AMQP channel |
||
125 | */ |
||
126 | protected function getChannel() |
||
130 | } |
||
131 |
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.