summaryrefslogtreecommitdiffstats
path: root/src/Components/OptionsArray.php
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2019-05-28 13:00:00 +0200
committerWilliam Desportes <williamdes@wdes.fr>2019-05-28 15:08:34 +0200
commit930a860bc7f0684c45babd012070f88a9505d427 (patch)
tree40269b2466aa6585c8c65f42d02a00a496c2fa46 /src/Components/OptionsArray.php
parent5d5089a259d0195c4a1e4aa3588c31c839954067 (diff)
downloadsql-parser-930a860bc7f0684c45babd012070f88a9505d427.zip
sql-parser-930a860bc7f0684c45babd012070f88a9505d427.tar.gz
sql-parser-930a860bc7f0684c45babd012070f88a9505d427.tar.bz2
revert of new array syntax
See: 86c5baebda24c1721fb6881df8671a3c7df60e8b Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'src/Components/OptionsArray.php')
-rw-r--r--src/Components/OptionsArray.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Components/OptionsArray.php b/src/Components/OptionsArray.php
index 40b07a3..4cd35d2 100644
--- a/src/Components/OptionsArray.php
+++ b/src/Components/OptionsArray.php
@@ -167,7 +167,7 @@ class OptionsArray extends Component
// This is only the beginning. The value is parsed in state
// 1 and 2. State 1 is used to skip the first equals sign
// and state 2 to parse the actual value.
- $ret->options[$lastOptionId] = [
+ $ret->options[$lastOptionId] = array(
// @var string The name of the option.
'name' => $token->value,
// @var bool Whether it contains an equal sign.
@@ -176,8 +176,8 @@ class OptionsArray extends Component
// @var string Raw value.
'expr' => '',
// @var string Processed value.
- 'value' => '',
- ];
+ 'value' => ''
+ );
$state = 1;
} elseif ($lastOption[1] === 'expr' || $lastOption[1] === 'expr=') {
// This is a keyword that is followed by an expression.
@@ -185,15 +185,15 @@ class OptionsArray extends Component
// Skipping this option in order to parse the expression.
++$list->idx;
- $ret->options[$lastOptionId] = [
+ $ret->options[$lastOptionId] = array(
// @var string The name of the option.
'name' => $token->value,
// @var bool Whether it contains an equal sign.
// This is used by the builder to rebuild it.
'equals' => $lastOption[1] === 'expr=',
// @var Expression The parsed expression.
- 'expr' => '',
- ];
+ 'expr' => ''
+ );
$state = 1;
}
} elseif ($state === 1) {
@@ -211,7 +211,7 @@ class OptionsArray extends Component
$ret->options[$lastOptionId]['expr'] = Expression::parse(
$parser,
$list,
- empty($lastOption[2]) ? [] : $lastOption[2]
+ empty($lastOption[2]) ? array() : $lastOption[2]
);
$ret->options[$lastOptionId]['value']
= $ret->options[$lastOptionId]['expr']->expr;