1 | <?php |
||
14 | class AMQP implements AdapterInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var Connection |
||
18 | */ |
||
19 | protected $connection; |
||
20 | |||
21 | /** |
||
22 | * AMQP constructor. |
||
23 | * |
||
24 | * @param Connection|ConnectionOptions|array|\Traversable|\AMQPConnection $connection |
||
25 | * @param Channel $channelPrototype |
||
26 | * @throws Exception\InvalidArgumentException |
||
27 | * @throws Exception\BadMethodCallException |
||
28 | */ |
||
29 | 8 | public function __construct($connection, Channel $channelPrototype = null) |
|
36 | |||
37 | /** |
||
38 | * @param Connection $connection |
||
39 | */ |
||
40 | 8 | public function registerConnection(Connection $connection) |
|
44 | |||
45 | /** |
||
46 | * @return Connection |
||
47 | */ |
||
48 | 8 | public function getConnection() |
|
52 | } |
||
53 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.