Make $table param non-nullable
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
This commit is contained in:
parent
2994f07e97
commit
489ef4715d
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user