Skip to content

Commit 81b118f

Browse files
committed
Adjust Key types and Table class after phpstan and unit tests analysis
Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent 32190f2 commit 81b118f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Components/Key.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ class Key extends Component
7777
public $expr = null;
7878

7979
/**
80-
* The options of this key.
80+
* The options of this key or null if none where found.
8181
*
82-
* @var OptionsArray
82+
* @var OptionsArray|null
8383
*/
8484
public $options;
8585

src/Utils/Table.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ public static function getForeignKeys($statement)
4242

4343
$columns = array();
4444
foreach ($field->key->columns as $column) {
45+
if (! isset($column['name'])) {
46+
continue;
47+
}
4548
$columns[] = $column['name'];
4649
}
4750

0 commit comments

Comments
 (0)