Skip to content

Commit 5d5089a

Browse files
committed
Revert array syntax
See: 86c5bae Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent 724b233 commit 5d5089a

Some content is hidden

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

49 files changed

+153
-153
lines changed

src/Component.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ abstract class Component
3636
public static function parse(
3737
Parser $parser,
3838
TokensList $list,
39-
array $options = []
39+
array $options = array()
4040
) {
4141
// This method should be abstract, but it can't be both static and
4242
// abstract.
@@ -56,7 +56,7 @@ public static function parse(
5656
*
5757
* @return string
5858
*/
59-
public static function build($component, array $options = [])
59+
public static function build($component, array $options = array())
6060
{
6161
// This method should be abstract, but it can't be both static and
6262
// abstract.

src/Components/AlterOperation.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class AlterOperation extends Component
153153
*
154154
* @var Token[]|string
155155
*/
156-
public $unknown = [];
156+
public $unknown = array();
157157

158158
/**
159159
* Constructor.
@@ -165,7 +165,7 @@ class AlterOperation extends Component
165165
public function __construct(
166166
$options = null,
167167
$field = null,
168-
$unknown = []
168+
$unknown = array()
169169
) {
170170
$this->options = $options;
171171
$this->field = $field;
@@ -179,7 +179,7 @@ public function __construct(
179179
*
180180
* @return AlterOperation
181181
*/
182-
public static function parse(Parser $parser, TokensList $list, array $options = [])
182+
public static function parse(Parser $parser, TokensList $list, array $options = array())
183183
{
184184
$ret = new self();
185185

@@ -315,7 +315,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
315315
*
316316
* @return string
317317
*/
318-
public static function build($component, array $options = [])
318+
public static function build($component, array $options = array())
319319
{
320320
$ret = $component->options . ' ';
321321
if ((isset($component->field)) && ($component->field !== '')) {

src/Components/Array2d.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ class Array2d extends Component
2828
*
2929
* @return ArrayObj[]
3030
*/
31-
public static function parse(Parser $parser, TokensList $list, array $options = [])
31+
public static function parse(Parser $parser, TokensList $list, array $options = array())
3232
{
33-
$ret = [];
33+
$ret = array();
3434

3535
/**
3636
* The number of values in each set.
@@ -124,7 +124,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
124124
*
125125
* @return string
126126
*/
127-
public static function build($component, array $options = [])
127+
public static function build($component, array $options = array())
128128
{
129129
return ArrayObj::build($component);
130130
}

src/Components/ArrayObj.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ class ArrayObj extends Component
2525
*
2626
* @var array
2727
*/
28-
public $raw = [];
28+
public $raw = array();
2929

3030
/**
3131
* The array that contains the processed value of each token.
3232
*
3333
* @var array
3434
*/
35-
public $values = [];
35+
public $values = array();
3636

3737
/**
3838
* Constructor.
3939
*
4040
* @param array $raw the unprocessed values
4141
* @param array $values the processed values
4242
*/
43-
public function __construct(array $raw = [], array $values = [])
43+
public function __construct(array $raw = array(), array $values = array())
4444
{
4545
$this->raw = $raw;
4646
$this->values = $values;
@@ -53,9 +53,9 @@ public function __construct(array $raw = [], array $values = [])
5353
*
5454
* @return ArrayObj|Component[]
5555
*/
56-
public static function parse(Parser $parser, TokensList $list, array $options = [])
56+
public static function parse(Parser $parser, TokensList $list, array $options = array())
5757
{
58-
$ret = empty($options['type']) ? new self() : [];
58+
$ret = empty($options['type']) ? new self() : array();
5959

6060
/**
6161
* The last raw expression.
@@ -176,7 +176,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
176176
*
177177
* @return string
178178
*/
179-
public static function build($component, array $options = [])
179+
public static function build($component, array $options = array())
180180
{
181181
if (is_array($component)) {
182182
return implode(', ', $component);

src/Components/CaseExpression.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@ class CaseExpression extends Component
3333
*
3434
* @var array
3535
*/
36-
public $conditions = [];
36+
public $conditions = array();
3737

3838
/**
3939
* The results matching with the WHEN clauses.
4040
*
4141
* @var array
4242
*/
43-
public $results = [];
43+
public $results = array();
4444

4545
/**
4646
* The values to be compared against.
4747
*
4848
* @var array
4949
*/
50-
public $compare_values = [];
50+
public $compare_values = array();
5151

5252
/**
5353
* The result in ELSE section of expr.
@@ -84,7 +84,7 @@ public function __construct()
8484
*
8585
* @return CaseExpression
8686
*/
87-
public static function parse(Parser $parser, TokensList $list, array $options = [])
87+
public static function parse(Parser $parser, TokensList $list, array $options = array())
8888
{
8989
$ret = new self();
9090

@@ -279,7 +279,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
279279
*
280280
* @return string
281281
*/
282-
public static function build($component, array $options = [])
282+
public static function build($component, array $options = array())
283283
{
284284
$ret = 'CASE ';
285285
if (isset($component->value)) {

src/Components/Condition.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Condition extends Component
6464
*
6565
* @var array
6666
*/
67-
public $identifiers = [];
67+
public $identifiers = array();
6868

6969
/**
7070
* Whether this component is an operator.
@@ -97,9 +97,9 @@ public function __construct($expr = null)
9797
*
9898
* @return Condition[]
9999
*/
100-
public static function parse(Parser $parser, TokensList $list, array $options = [])
100+
public static function parse(Parser $parser, TokensList $list, array $options = array())
101101
{
102-
$ret = [];
102+
$ret = array();
103103

104104
$expr = new self();
105105

@@ -222,7 +222,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
222222
*
223223
* @return string
224224
*/
225-
public static function build($component, array $options = [])
225+
public static function build($component, array $options = array())
226226
{
227227
if (is_array($component)) {
228228
return implode(' ', $component);

src/Components/CreateDefinition.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ public function __construct(
172172
*
173173
* @return CreateDefinition[]
174174
*/
175-
public static function parse(Parser $parser, TokensList $list, array $options = [])
175+
public static function parse(Parser $parser, TokensList $list, array $options = array())
176176
{
177-
$ret = [];
177+
$ret = array();
178178

179179
$expr = new self();
180180

@@ -326,7 +326,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
326326
*
327327
* @return string
328328
*/
329-
public static function build($component, array $options = [])
329+
public static function build($component, array $options = array())
330330
{
331331
if (is_array($component)) {
332332
return "(\n " . implode(",\n ", $component) . "\n)";

src/Components/DataType.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class DataType extends Component
6363
*
6464
* @var array
6565
*/
66-
public $parameters = [];
66+
public $parameters = array();
6767

6868
/**
6969
* The options of this data type.
@@ -81,7 +81,7 @@ class DataType extends Component
8181
*/
8282
public function __construct(
8383
$name = null,
84-
array $parameters = [],
84+
array $parameters = array(),
8585
$options = null
8686
) {
8787
$this->name = $name;
@@ -96,7 +96,7 @@ public function __construct(
9696
*
9797
* @return DataType
9898
*/
99-
public static function parse(Parser $parser, TokensList $list, array $options = [])
99+
public static function parse(Parser $parser, TokensList $list, array $options = array())
100100
{
101101
$ret = new self();
102102

@@ -160,7 +160,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
160160
*
161161
* @return string
162162
*/
163-
public static function build($component, array $options = [])
163+
public static function build($component, array $options = array())
164164
{
165165
$name = empty($options['lowercase']) ?
166166
$component->name : strtolower($component->name);

src/Components/Expression.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function __construct($database = null, $table = null, $column = null, $al
155155
*
156156
* @return Expression
157157
*/
158-
public static function parse(Parser $parser, TokensList $list, array $options = [])
158+
public static function parse(Parser $parser, TokensList $list, array $options = array())
159159
{
160160
$ret = new self();
161161

@@ -430,7 +430,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
430430
*
431431
* @return string
432432
*/
433-
public static function build($component, array $options = [])
433+
public static function build($component, array $options = array())
434434
{
435435
if (is_array($component)) {
436436
return implode($component, ', ');
@@ -439,7 +439,7 @@ public static function build($component, array $options = [])
439439
if ($component->expr !== '' && ! is_null($component->expr)) {
440440
$ret = $component->expr;
441441
} else {
442-
$fields = [];
442+
$fields = array();
443443
if (isset($component->database) && ($component->database !== '')) {
444444
$fields[] = $component->database;
445445
}

src/Components/ExpressionArray.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ class ExpressionArray extends Component
2727
*
2828
* @return Expression[]
2929
*/
30-
public static function parse(Parser $parser, TokensList $list, array $options = [])
30+
public static function parse(Parser $parser, TokensList $list, array $options = array())
3131
{
32-
$ret = [];
32+
$ret = array();
3333

3434
/**
3535
* The state of the parser.
@@ -115,9 +115,9 @@ public static function parse(Parser $parser, TokensList $list, array $options =
115115
*
116116
* @return string
117117
*/
118-
public static function build($component, array $options = [])
118+
public static function build($component, array $options = array())
119119
{
120-
$ret = [];
120+
$ret = array();
121121
foreach ($component as $frag) {
122122
$ret[] = $frag::build($frag);
123123
}

0 commit comments

Comments
 (0)