diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 8f86deeea4..df3e94b500 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -6819,12 +6819,6 @@ parameters: count: 1 path: src/Dbal/DatabaseInterface.php - - - message: '#^Foreach overwrites \$table with its value variable\.$#' - identifier: foreach.valueOverwrite - count: 1 - path: src/Dbal/DatabaseInterface.php - - message: '#^Loose comparison via "\=\=" is not allowed\.$#' identifier: equal.notAllowed diff --git a/src/Dbal/DatabaseInterface.php b/src/Dbal/DatabaseInterface.php index be7d1572ce..7fc05c84e2 100644 --- a/src/Dbal/DatabaseInterface.php +++ b/src/Dbal/DatabaseInterface.php @@ -748,20 +748,20 @@ class DatabaseInterface * returns detailed array with all columns for given table in database, * or all tables/databases * - * @param string $database name of database - * @param string|null $table name of table to retrieve columns from + * @param string $database name of database + * @param string $table name of table to retrieve columns from * * @return mixed[] */ public function getColumnsFull( string $database, - string|null $table = null, + string $table, ConnectionType $connectionType = ConnectionType::User, ): array { if (! $this->config->selectedServer['DisableIS']) { $sql = QueryGenerator::getInformationSchemaColumnsFullRequest( $this->quoteString($database, $connectionType), - $table !== null ? $this->quoteString($table, $connectionType) : null, + $this->quoteString($table, $connectionType), null, ); $arrayKeys = QueryGenerator::getInformationSchemaColumns($database, $table, null); @@ -769,17 +769,6 @@ class DatabaseInterface return $this->fetchResult($sql, $arrayKeys, null, $connectionType); } - $columns = []; - - if ($table === null) { - $tables = $this->getTables($database); - foreach ($tables as $table) { - $columns[$table] = $this->getColumnsFull($database, $table, $connectionType); - } - - return $columns; - } - $sql = QueryGenerator::getColumnsSql($database, $table, null, true); $columns = $this->fetchResult($sql, 'Field', null, $connectionType);