From 4fa36f175136b003845803c056c330bef56ac1a4 Mon Sep 17 00:00:00 2001 From: Alessandro Minoccheri Date: Sun, 13 May 2018 00:01:10 +0200 Subject: [PATCH] initialize sql array into platform files --- lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php | 2 +- lib/Doctrine/DBAL/Platforms/MySqlPlatform.php | 2 +- lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php | 2 +- lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php | 2 +- lib/Doctrine/DBAL/Platforms/SqlitePlatform.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php b/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php index 3037d895e3e..b56134d9556 100644 --- a/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php @@ -240,7 +240,7 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options $query .= $this->buildTableOptions($options); $query .= $this->buildPartitionOptions($options); - $sql[] = $query; + $sql = [$query]; if (isset($options['foreignKeys'])) { foreach ((array) $options['foreignKeys'] as $definition) { diff --git a/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php b/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php index e318c2650ce..bca89fb5993 100644 --- a/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php @@ -457,7 +457,7 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options $query .= $this->buildTableOptions($options); $query .= $this->buildPartitionOptions($options); - $sql[] = $query; + $sql = [$query]; $engine = 'INNODB'; if (isset($options['engine'])) { diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php index 61f6e09c497..2cb0bf56f82 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php @@ -782,7 +782,7 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options $query = 'CREATE TABLE ' . $tableName . ' (' . $queryFields . ')'; - $sql[] = $query; + $sql = [$query]; if (isset($options['indexes']) && ! empty($options['indexes'])) { foreach ($options['indexes'] as $index) { diff --git a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php index 3531afb9836..84428379ed0 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php @@ -304,7 +304,7 @@ protected function _getCreateTableSQL($tableName, array $columns, array $options } $query .= ')'; - $sql[] = $query; + $sql = [$query]; if (isset($options['indexes']) && !empty($options['indexes'])) { foreach ($options['indexes'] as $index) { diff --git a/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php b/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php index 60b6905a9c6..67a3907b83a 100644 --- a/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php @@ -351,7 +351,7 @@ protected function _getCreateTableSQL($name, array $columns, array $options = [] } } - $query[] = 'CREATE TABLE ' . $name . ' (' . $queryFields . ')'; + $query = ['CREATE TABLE ' . $name . ' (' . $queryFields . ')']; if (isset($options['alter']) && true === $options['alter']) { return $query;