diff options
author | William Desportes <williamdes@wdes.fr> | 2019-05-28 13:00:00 +0200 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2019-05-28 15:08:32 +0200 |
commit | 5d5089a259d0195c4a1e4aa3588c31c839954067 (patch) | |
tree | 645dab617127089baadcf5e3eed95e0f21a5b46c /src/Utils/Query.php | |
parent | 724b2330dc4cb6247aa1649cc1f49fce496f2e3c (diff) | |
download | sql-parser-5d5089a259d0195c4a1e4aa3588c31c839954067.zip sql-parser-5d5089a259d0195c4a1e4aa3588c31c839954067.tar.gz sql-parser-5d5089a259d0195c4a1e4aa3588c31c839954067.tar.bz2 |
Revert array syntax
See: 86c5baebda24c1721fb6881df8671a3c7df60e8b
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'src/Utils/Query.php')
-rw-r--r-- | src/Utils/Query.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Utils/Query.php b/src/Utils/Query.php index 7b14ded..861e690 100644 --- a/src/Utils/Query.php +++ b/src/Utils/Query.php @@ -416,11 +416,11 @@ class Query $ret['statement'] = $statement; if ($statement instanceof SelectStatement) { - $ret['select_tables'] = []; - $ret['select_expr'] = []; + $ret['select_tables'] = array(); + $ret['select_expr'] = array(); // Finding tables' aliases and their associated real names. - $tableAliases = []; + $tableAliases = array(); foreach ($statement->from as $expr) { if (isset($expr->table, $expr->alias) && ($expr->table !== '') && ($expr->alias !== '') ) { @@ -484,7 +484,7 @@ class Query */ public static function getTables($statement) { - $expressions = []; + $expressions = array(); if (($statement instanceof InsertStatement) || ($statement instanceof ReplaceStatement) @@ -503,7 +503,7 @@ class Query } elseif ($statement instanceof DropStatement) { if (! $statement->options->has('TABLE')) { // No tables are dropped. - return []; + return array(); } $expressions = $statement->fields; } elseif ($statement instanceof RenameStatement) { @@ -512,7 +512,7 @@ class Query } } - $ret = []; + $ret = array(); foreach ($expressions as $expr) { if (! empty($expr->table)) { $expr->expr = null; // Force rebuild. |