| 1 | <?php |
||
| 10 | class PhpAmqpLib implements AdapterInterface |
||
| 11 | { |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @var Connection |
||
| 15 | */ |
||
| 16 | protected $connection; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * PhpAmqpLib constructor. |
||
| 20 | * |
||
| 21 | * @param Connection|ConnectionOptions|array|\Traversable|LibConnection $connection |
||
| 22 | * @param Channel $channelPrototype |
||
| 23 | * @throws Exception\BadMethodCallException |
||
| 24 | * @throws Exception\InvalidArgumentException |
||
| 25 | * @throws Exception\RuntimeException |
||
| 26 | */ |
||
| 27 | 8 | public function __construct($connection, Channel $channelPrototype = null) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @param Connection $connection |
||
| 37 | */ |
||
| 38 | 8 | public function registerConnection(Connection $connection) |
|
| 42 | |||
| 43 | /** |
||
| 44 | * @return Connection |
||
| 45 | */ |
||
| 46 | 8 | public function getConnection() |
|
| 50 | } |
||
| 51 |
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.