diff --git a/analyzer-baseline.toml b/analyzer-baseline.toml index 0f0fa4a6..c2815625 100644 --- a/analyzer-baseline.toml +++ b/analyzer-baseline.toml @@ -1992,18 +1992,6 @@ code = "possibly-undefined-string-array-index" message = "Possibly undefined array key `string('combine')` accessed on `array|null>>|string>`." count = 1 -[[issues]] -file = "src/Sql/Combine.php" -code = "undefined-int-array-index" -message = 'Undefined list index `1` accessed on `list{PhpDb\Sql\Select}`.' -count = 1 - -[[issues]] -file = "src/Sql/Combine.php" -code = "undefined-int-array-index" -message = 'Undefined list index `2` accessed on `list{PhpDb\Sql\Select}`.' -count = 1 - [[issues]] file = "src/Sql/Ddl/AlterTable.php" code = "class-must-be-final" diff --git a/src/Sql/Combine.php b/src/Sql/Combine.php index 0971b481..5053ba64 100644 --- a/src/Sql/Combine.php +++ b/src/Sql/Combine.php @@ -93,7 +93,8 @@ public function combine(Select|array $select, string $type = self::COMBINE_UNION if (is_array($select)) { foreach ($select as $combine) { if ($combine instanceof Select) { - $combine = [$combine]; + $this->combine($combine, $type, $modifier); + continue; } $this->combine(