1 | <?php declare(strict_types=1); |
||
22 | class Driver extends AbstractDriver { |
||
23 | |||
24 | /** |
||
25 | * Connect to a PosgreSQL database |
||
26 | * |
||
27 | * @codeCoverageIgnore |
||
28 | * @param string $dsn |
||
29 | * @param string $username |
||
30 | * @param string $password |
||
31 | * @param array $options |
||
32 | */ |
||
33 | public function __construct(string $dsn, string $username=NULL, string $password=NULL, array $options=[]) |
||
42 | |||
43 | /** |
||
44 | * Get a list of schemas for the current connection |
||
45 | * |
||
46 | * @return array |
||
47 | */ |
||
48 | public function getSchemas(): ?array |
||
58 | |||
59 | /** |
||
60 | * Retrieve foreign keys for the table |
||
61 | * |
||
62 | * @param string $table |
||
63 | * @return array |
||
64 | */ |
||
65 | public function getFks($table): array |
||
87 | } |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.