Skip to content

Commit 4feb904

Browse files
Fix issue psalm. (#193)
1 parent 2481289 commit 4feb904

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

src/Schema.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,19 @@ protected function findColumns(TableSchemaInterface $table): bool
360360
foreach ($columns as $column) {
361361
$column = $this->normalizeRowKeyCase($column, false);
362362

363+
/**
364+
* @psalm-var array{
365+
* column_name: string,
366+
* data_type: string,
367+
* data_precision: string,
368+
* data_scale: string,
369+
* data_length: string,
370+
* nullable: string,
371+
* data_default: string|null,
372+
* is_pk: string|null,
373+
* column_comment: string|null
374+
* } $column $column
375+
*/
363376
$c = $this->createColumnSchema($column);
364377

365378
$table->columns($c->getName(), $c);
@@ -415,7 +428,7 @@ protected function getTableSequenceName(string $tableName): bool|float|int|strin
415428
*
416429
* @return ColumnSchemaInterface
417430
*/
418-
protected function createColumnSchema(array|string $column): ColumnSchemaInterface
431+
protected function createColumnSchema(array $column): ColumnSchemaInterface
419432
{
420433
$c = new ColumnSchema($column['column_name']);
421434
$c->allowNull($column['nullable'] === 'Y');

0 commit comments

Comments
 (0)