Skip to content

Commit 930a860

Browse files
committed
revert of new array syntax
See: 86c5bae Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent 5d5089a commit 930a860

File tree

108 files changed

+1998
-2000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1998
-2000
lines changed

src/Components/AlterOperation.php

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -25,67 +25,67 @@ class AlterOperation extends Component
2525
*
2626
* @var array
2727
*/
28-
public static $DB_OPTIONS = [
29-
'CHARACTER SET' => [
28+
public static $DB_OPTIONS = array(
29+
'CHARACTER SET' => array(
3030
1,
31-
'var',
32-
],
33-
'CHARSET' => [
31+
'var'
32+
),
33+
'CHARSET' => array(
3434
1,
35-
'var',
36-
],
37-
'DEFAULT CHARACTER SET' => [
35+
'var'
36+
),
37+
'DEFAULT CHARACTER SET' => array(
3838
1,
39-
'var',
40-
],
41-
'DEFAULT CHARSET' => [
39+
'var'
40+
),
41+
'DEFAULT CHARSET' => array(
4242
1,
43-
'var',
44-
],
45-
'UPGRADE' => [
43+
'var'
44+
),
45+
'UPGRADE' => array(
4646
1,
47-
'var',
48-
],
49-
'COLLATE' => [
47+
'var'
48+
),
49+
'COLLATE' => array(
5050
2,
51-
'var',
52-
],
53-
'DEFAULT COLLATE' => [
51+
'var'
52+
),
53+
'DEFAULT COLLATE' => array(
5454
2,
55-
'var',
56-
],
57-
];
55+
'var'
56+
)
57+
);
5858

5959
/**
6060
* All table options.
6161
*
6262
* @var array
6363
*/
64-
public static $TABLE_OPTIONS = [
65-
'ENGINE' => [
64+
public static $TABLE_OPTIONS = array(
65+
'ENGINE' => array(
6666
1,
67-
'var=',
68-
],
69-
'AUTO_INCREMENT' => [
67+
'var='
68+
),
69+
'AUTO_INCREMENT' => array(
7070
1,
71-
'var=',
72-
],
73-
'AVG_ROW_LENGTH' => [
71+
'var='
72+
),
73+
'AVG_ROW_LENGTH' => array(
7474
1,
75-
'var',
76-
],
77-
'MAX_ROWS' => [
75+
'var'
76+
),
77+
'MAX_ROWS' => array(
7878
1,
79-
'var',
80-
],
81-
'ROW_FORMAT' => [
79+
'var'
80+
),
81+
'ROW_FORMAT' => array(
8282
1,
83-
'var',
84-
],
85-
'COMMENT' => [
83+
'var'
84+
),
85+
'COMMENT' => array(
8686
1,
87-
'var',
88-
],
87+
'var'
88+
),
8989
'ADD' => 1,
9090
'ALTER' => 1,
9191
'ANALYZE' => 1,
@@ -122,17 +122,17 @@ class AlterOperation extends Component
122122
'PRIMARY KEY' => 2,
123123
'SPATIAL' => 2,
124124
'TABLESPACE' => 2,
125-
'INDEX' => 2,
126-
];
125+
'INDEX' => 2
126+
);
127127

128128
/**
129129
* All view options.
130130
*
131131
* @var array
132132
*/
133-
public static $VIEW_OPTIONS = [
133+
public static $VIEW_OPTIONS = array(
134134
'AS' => 1,
135-
];
135+
);
136136

137137
/**
138138
* Options of this operation.
@@ -251,10 +251,10 @@ public static function parse(Parser $parser, TokensList $list, array $options =
251251
$ret->field = Expression::parse(
252252
$parser,
253253
$list,
254-
[
254+
array(
255255
'breakOnAlias' => true,
256-
'parseField' => 'column',
257-
]
256+
'parseField' => 'column'
257+
)
258258
);
259259
if ($ret->field === null) {
260260
// No field was read. We go back one token so the next
@@ -334,13 +334,13 @@ public static function build($component, array $options = array())
334334
*/
335335
private static function checkIfColumnDefinitionKeyword($tokenValue)
336336
{
337-
$common_options = [
337+
$common_options = array(
338338
'AUTO_INCREMENT',
339339
'COMMENT',
340340
'DEFAULT',
341341
'CHARACTER SET',
342342
'COLLATE'
343-
];
343+
);
344344
// Since these options can be used for
345345
// both table as well as a specific column in the table
346346
return in_array($tokenValue, $common_options);

src/Components/ArrayObj.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
144144
$ret[] = $options['type']::parse(
145145
$parser,
146146
$list,
147-
empty($options['typeOptions']) ? [] : $options['typeOptions']
147+
empty($options['typeOptions']) ? array() : $options['typeOptions']
148148
);
149149
}
150150
}

src/Components/CaseExpression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
216216
if ($token->type === Token::TYPE_DELIMITER) {
217217
break;
218218
}
219-
219+
220220
// Skipping whitespaces and comments.
221221
if (($token->type === Token::TYPE_WHITESPACE)
222222
|| ($token->type === Token::TYPE_COMMENT)

src/Components/Condition.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ class Condition extends Component
2525
*
2626
* @var array
2727
*/
28-
public static $DELIMITERS = [
28+
public static $DELIMITERS = array(
2929
'&&',
3030
'||',
3131
'AND',
3232
'OR',
33-
'XOR',
34-
];
33+
'XOR'
34+
);
3535

3636
/**
3737
* List of allowed reserved keywords in conditions.
3838
*
3939
* @var array
4040
*/
41-
public static $ALLOWED_KEYWORDS = [
41+
public static $ALLOWED_KEYWORDS = array(
4242
'ALL' => 1,
4343
'AND' => 1,
4444
'BETWEEN' => 1,
@@ -56,8 +56,8 @@ class Condition extends Component
5656
'OR' => 1,
5757
'REGEXP' => 1,
5858
'RLIKE' => 1,
59-
'XOR' => 1,
60-
];
59+
'XOR' => 1
60+
);
6161

6262
/**
6363
* Identifiers recognized.

src/Components/CreateDefinition.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,56 +30,56 @@ class CreateDefinition extends Component
3030
*
3131
* @var array
3232
*/
33-
public static $FIELD_OPTIONS = [
33+
public static $FIELD_OPTIONS = array(
3434
// Tells the `OptionsArray` to not sort the options.
3535
// See the note below.
3636
'_UNSORTED' => true,
3737

3838
'NOT NULL' => 1,
3939
'NULL' => 1,
40-
'DEFAULT' => [
40+
'DEFAULT' => array(
4141
2,
4242
'expr',
43-
['breakOnAlias' => true],
44-
],
43+
array('breakOnAlias' => true)
44+
),
4545
/* Following are not according to grammar, but MySQL happily accepts
4646
* these at any location */
47-
'CHARSET' => [
47+
'CHARSET' => array(
4848
2,
4949
'var',
50-
],
51-
'COLLATE' => [
50+
),
51+
'COLLATE' => array(
5252
3,
5353
'var',
54-
],
54+
),
5555
'AUTO_INCREMENT' => 3,
5656
'PRIMARY' => 4,
5757
'PRIMARY KEY' => 4,
5858
'UNIQUE' => 4,
5959
'UNIQUE KEY' => 4,
60-
'COMMENT' => [
60+
'COMMENT' => array(
6161
5,
6262
'var',
63-
],
64-
'COLUMN_FORMAT' => [
63+
),
64+
'COLUMN_FORMAT' => array(
6565
6,
6666
'var',
67-
],
68-
'ON UPDATE' => [
67+
),
68+
'ON UPDATE' => array(
6969
7,
7070
'expr',
71-
],
71+
),
7272

7373
// Generated columns options.
7474
'GENERATED ALWAYS' => 8,
75-
'AS' => [
75+
'AS' => array(
7676
9,
7777
'expr',
78-
['parenthesesDelimited' => true],
79-
],
78+
array('parenthesesDelimited' => true)
79+
),
8080
'VIRTUAL' => 10,
8181
'PERSISTENT' => 11,
82-
'STORED' => 11,
82+
'STORED' => 11
8383
// Common entries.
8484
//
8585
// NOTE: Some of the common options are not in the same order which
@@ -94,7 +94,7 @@ class CreateDefinition extends Component
9494
// 'NULL' => 1,
9595
// 'PRIMARY' => 4,
9696
// 'PRIMARY KEY' => 4,
97-
];
97+
);
9898

9999
/**
100100
* The name of the new column.
@@ -345,7 +345,7 @@ public static function build($component, array $options = array())
345345
if (! empty($component->type)) {
346346
$tmp .= DataType::build(
347347
$component->type,
348-
['lowercase' => true]
348+
array('lowercase' => true)
349349
) . ' ';
350350
}
351351

src/Components/DataType.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ class DataType extends Component
2525
*
2626
* @var array
2727
*/
28-
public static $DATA_TYPE_OPTIONS = [
28+
public static $DATA_TYPE_OPTIONS = array(
2929
'BINARY' => 1,
30-
'CHARACTER SET' => [
30+
'CHARACTER SET' => array(
3131
2,
3232
'var',
33-
],
34-
'CHARSET' => [
33+
),
34+
'CHARSET' => array(
3535
2,
3636
'var',
37-
],
38-
'COLLATE' => [
37+
),
38+
'COLLATE' => array(
3939
3,
4040
'var',
41-
],
41+
),
4242
'UNSIGNED' => 4,
43-
'ZEROFILL' => 5,
44-
];
43+
'ZEROFILL' => 5
44+
);
4545

4646
/**
4747
* The name of the data type.

src/Components/Expression.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Expression extends Component
2828
*
2929
* @var array
3030
*/
31-
private static $ALLOWED_KEYWORDS = [
31+
private static $ALLOWED_KEYWORDS = array(
3232
'AS' => 1,
3333
'DUAL' => 1,
3434
'NULL' => 1,
@@ -39,8 +39,8 @@ class Expression extends Component
3939
'OR' => 1,
4040
'XOR' => 1,
4141
'NOT' => 1,
42-
'MOD' => 1,
43-
];
42+
'MOD' => 1
43+
);
4444

4545
/**
4646
* The name of this database.
@@ -192,10 +192,10 @@ public static function parse(Parser $parser, TokensList $list, array $options =
192192
*
193193
* @var Token[]
194194
*/
195-
$prev = [
195+
$prev = array(
196196
null,
197-
null,
198-
];
197+
null
198+
);
199199

200200
// When a field is parsed, no parentheses are expected.
201201
if (! empty($options['parseField'])) {

0 commit comments

Comments
 (0)