| 1 | <?php |
||
| 8 | class Manager |
||
| 9 | { |
||
| 10 | /** @var \Wandu\Database\Contracts\ConnectionInterface[] */ |
||
| 11 | protected $connections = []; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * @param array|\Wandu\Database\Configuration|\Wandu\Database\Contracts\ConnectionInterface $connection |
||
| 15 | * @param string $name |
||
| 16 | * @return \Wandu\Database\Contracts\ConnectionInterface |
||
| 17 | */ |
||
| 18 | 17 | public function connect($connection, $name = 'default') |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $name |
||
| 38 | * @return \Wandu\Database\Contracts\ConnectionInterface |
||
| 39 | */ |
||
| 40 | public function connection($name = 'default') |
||
| 44 | } |
||
| 45 |
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.