Skip to content

Commit 8c9935d

Browse files
committed
$table of type null|object<NilPortug...uilder\Syntax\Table>, but the function expects a string
1 parent a7cb09f commit 8c9935d

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/Builder/Syntax/ColumnWriter.php

+2
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ function (&$column) use (&$selectWriter) {
7676
$key = array_pop($keys);
7777

7878
$values = array_values($column);
79+
7980
$value = $values[0];
8081

8182
if (is_numeric($key)) {
83+
/** @var Column $value */
8284
$key = $this->writer->writeTableName($value->getTable());
8385
}
8486

src/Manipulation/Update.php

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class Update extends BaseQuery
3232

3333
/**
3434
* @param string $table
35+
* @param array $values
3536
*/
3637
public function __construct($table = null, array $values = null)
3738
{

src/Syntax/SyntaxFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static function createColumn(array &$argument, $table = null)
6262
$columnAlias = null;
6363
}
6464

65-
return new Column($columnName, $table, $columnAlias);
65+
return new Column($columnName, (string) $table, $columnAlias);
6666
}
6767

6868
/**

0 commit comments

Comments
 (0)