summaryrefslogtreecommitdiffstats
path: root/src/Components
diff options
context:
space:
mode:
Diffstat (limited to 'src/Components')
-rw-r--r--src/Components/AlterOperation.php8
-rw-r--r--src/Components/Array2d.php6
-rw-r--r--src/Components/ArrayObj.php12
-rw-r--r--src/Components/CaseExpression.php10
-rw-r--r--src/Components/Condition.php8
-rw-r--r--src/Components/CreateDefinition.php6
-rw-r--r--src/Components/DataType.php8
-rw-r--r--src/Components/Expression.php6
-rw-r--r--src/Components/ExpressionArray.php8
-rw-r--r--src/Components/FunctionCall.php4
-rw-r--r--src/Components/GroupKeyword.php6
-rw-r--r--src/Components/IndexHint.php10
-rw-r--r--src/Components/IntoKeyword.php4
-rw-r--r--src/Components/JoinKeyword.php8
-rw-r--r--src/Components/Key.php12
-rw-r--r--src/Components/Limit.php4
-rw-r--r--src/Components/LockExpression.php4
-rw-r--r--src/Components/OptionsArray.php10
-rw-r--r--src/Components/OrderKeyword.php6
-rw-r--r--src/Components/ParameterDefinition.php6
-rw-r--r--src/Components/PartitionDefinition.php4
-rw-r--r--src/Components/Reference.php6
-rw-r--r--src/Components/RenameOperation.php6
-rw-r--r--src/Components/SetOperation.php6
-rw-r--r--src/Components/UnionKeyword.php4
25 files changed, 86 insertions, 86 deletions
diff --git a/src/Components/AlterOperation.php b/src/Components/AlterOperation.php
index 9d2393a..fc06644 100644
--- a/src/Components/AlterOperation.php
+++ b/src/Components/AlterOperation.php
@@ -153,7 +153,7 @@ class AlterOperation extends Component
*
* @var Token[]|string
*/
- public $unknown = [];
+ public $unknown = array();
/**
* Constructor.
@@ -165,7 +165,7 @@ class AlterOperation extends Component
public function __construct(
$options = null,
$field = null,
- $unknown = []
+ $unknown = array()
) {
$this->options = $options;
$this->field = $field;
@@ -179,7 +179,7 @@ class AlterOperation extends Component
*
* @return AlterOperation
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
$ret = new self();
@@ -315,7 +315,7 @@ class AlterOperation extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
$ret = $component->options . ' ';
if ((isset($component->field)) && ($component->field !== '')) {
diff --git a/src/Components/Array2d.php b/src/Components/Array2d.php
index 7c99952..29e9dac 100644
--- a/src/Components/Array2d.php
+++ b/src/Components/Array2d.php
@@ -28,9 +28,9 @@ class Array2d extends Component
*
* @return ArrayObj[]
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
- $ret = [];
+ $ret = array();
/**
* The number of values in each set.
@@ -124,7 +124,7 @@ class Array2d extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
return ArrayObj::build($component);
}
diff --git a/src/Components/ArrayObj.php b/src/Components/ArrayObj.php
index 7748be9..769ce37 100644
--- a/src/Components/ArrayObj.php
+++ b/src/Components/ArrayObj.php
@@ -25,14 +25,14 @@ class ArrayObj extends Component
*
* @var array
*/
- public $raw = [];
+ public $raw = array();
/**
* The array that contains the processed value of each token.
*
* @var array
*/
- public $values = [];
+ public $values = array();
/**
* Constructor.
@@ -40,7 +40,7 @@ class ArrayObj extends Component
* @param array $raw the unprocessed values
* @param array $values the processed values
*/
- public function __construct(array $raw = [], array $values = [])
+ public function __construct(array $raw = array(), array $values = array())
{
$this->raw = $raw;
$this->values = $values;
@@ -53,9 +53,9 @@ class ArrayObj extends Component
*
* @return ArrayObj|Component[]
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
- $ret = empty($options['type']) ? new self() : [];
+ $ret = empty($options['type']) ? new self() : array();
/**
* The last raw expression.
@@ -176,7 +176,7 @@ class ArrayObj extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (is_array($component)) {
return implode(', ', $component);
diff --git a/src/Components/CaseExpression.php b/src/Components/CaseExpression.php
index 309f0ff..468cf6d 100644
--- a/src/Components/CaseExpression.php
+++ b/src/Components/CaseExpression.php
@@ -33,21 +33,21 @@ class CaseExpression extends Component
*
* @var array
*/
- public $conditions = [];
+ public $conditions = array();
/**
* The results matching with the WHEN clauses.
*
* @var array
*/
- public $results = [];
+ public $results = array();
/**
* The values to be compared against.
*
* @var array
*/
- public $compare_values = [];
+ public $compare_values = array();
/**
* The result in ELSE section of expr.
@@ -84,7 +84,7 @@ class CaseExpression extends Component
*
* @return CaseExpression
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
$ret = new self();
@@ -279,7 +279,7 @@ class CaseExpression extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
$ret = 'CASE ';
if (isset($component->value)) {
diff --git a/src/Components/Condition.php b/src/Components/Condition.php
index c37ce19..edf01b0 100644
--- a/src/Components/Condition.php
+++ b/src/Components/Condition.php
@@ -64,7 +64,7 @@ class Condition extends Component
*
* @var array
*/
- public $identifiers = [];
+ public $identifiers = array();
/**
* Whether this component is an operator.
@@ -97,9 +97,9 @@ class Condition extends Component
*
* @return Condition[]
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
- $ret = [];
+ $ret = array();
$expr = new self();
@@ -222,7 +222,7 @@ class Condition extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (is_array($component)) {
return implode(' ', $component);
diff --git a/src/Components/CreateDefinition.php b/src/Components/CreateDefinition.php
index 3d3a3f4..506832a 100644
--- a/src/Components/CreateDefinition.php
+++ b/src/Components/CreateDefinition.php
@@ -172,9 +172,9 @@ class CreateDefinition extends Component
*
* @return CreateDefinition[]
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
- $ret = [];
+ $ret = array();
$expr = new self();
@@ -326,7 +326,7 @@ class CreateDefinition extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (is_array($component)) {
return "(\n " . implode(",\n ", $component) . "\n)";
diff --git a/src/Components/DataType.php b/src/Components/DataType.php
index 5be45c6..75a70fc 100644
--- a/src/Components/DataType.php
+++ b/src/Components/DataType.php
@@ -63,7 +63,7 @@ class DataType extends Component
*
* @var array
*/
- public $parameters = [];
+ public $parameters = array();
/**
* The options of this data type.
@@ -81,7 +81,7 @@ class DataType extends Component
*/
public function __construct(
$name = null,
- array $parameters = [],
+ array $parameters = array(),
$options = null
) {
$this->name = $name;
@@ -96,7 +96,7 @@ class DataType extends Component
*
* @return DataType
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
$ret = new self();
@@ -160,7 +160,7 @@ class DataType extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
$name = empty($options['lowercase']) ?
$component->name : strtolower($component->name);
diff --git a/src/Components/Expression.php b/src/Components/Expression.php
index 7a71c76..1cac3a0 100644
--- a/src/Components/Expression.php
+++ b/src/Components/Expression.php
@@ -155,7 +155,7 @@ class Expression extends Component
*
* @return Expression
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
$ret = new self();
@@ -430,7 +430,7 @@ class Expression extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (is_array($component)) {
return implode($component, ', ');
@@ -439,7 +439,7 @@ class Expression extends Component
if ($component->expr !== '' && ! is_null($component->expr)) {
$ret = $component->expr;
} else {
- $fields = [];
+ $fields = array();
if (isset($component->database) && ($component->database !== '')) {
$fields[] = $component->database;
}
diff --git a/src/Components/ExpressionArray.php b/src/Components/ExpressionArray.php
index 2f44d7a..96dcb50 100644
--- a/src/Components/ExpressionArray.php
+++ b/src/Components/ExpressionArray.php
@@ -27,9 +27,9 @@ class ExpressionArray extends Component
*
* @return Expression[]
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
- $ret = [];
+ $ret = array();
/**
* The state of the parser.
@@ -115,9 +115,9 @@ class ExpressionArray extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
- $ret = [];
+ $ret = array();
foreach ($component as $frag) {
$ret[] = $frag::build($frag);
}
diff --git a/src/Components/FunctionCall.php b/src/Components/FunctionCall.php
index 382ee8f..aaffbbb 100644
--- a/src/Components/FunctionCall.php
+++ b/src/Components/FunctionCall.php
@@ -57,7 +57,7 @@ class FunctionCall extends Component
*
* @return FunctionCall
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
$ret = new self();
@@ -112,7 +112,7 @@ class FunctionCall extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
return $component->name . $component->parameters;
}
diff --git a/src/Components/GroupKeyword.php b/src/Components/GroupKeyword.php
index 9aa583d..a2006a7 100644
--- a/src/Components/GroupKeyword.php
+++ b/src/Components/GroupKeyword.php
@@ -44,9 +44,9 @@ class GroupKeyword extends Component
*
* @return GroupKeyword[]
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
- $ret = [];
+ $ret = array();
$expr = new self();
@@ -120,7 +120,7 @@ class GroupKeyword extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (is_array($component)) {
return implode(', ', $component);
diff --git a/src/Components/IndexHint.php b/src/Components/IndexHint.php
index a0cb0f1..9284945 100644
--- a/src/Components/IndexHint.php
+++ b/src/Components/IndexHint.php
@@ -46,7 +46,7 @@ class IndexHint extends Component
*
* @var array
*/
- public $indexes = [];
+ public $indexes = array();
/**
* Constructor.
@@ -56,7 +56,7 @@ class IndexHint extends Component
* @param string $for the clause for which this hint is (JOIN/ORDER BY/GROUP BY)
* @param string $indexes List of indexes in this hint
*/
- public function __construct(string $type = null, string $indexOrKey = null, string $for = null, array $indexes = [])
+ public function __construct(string $type = null, string $indexOrKey = null, string $for = null, array $indexes = array())
{
$this->type = $type;
$this->indexOrKey = $indexOrKey;
@@ -71,9 +71,9 @@ class IndexHint extends Component
*
* @return IndexHint|Component[]
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
- $ret = [];
+ $ret = array();
$expr = new self();
$expr->type = isset($options['type']) ? $options['type'] : null;
/**
@@ -178,7 +178,7 @@ class IndexHint extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (is_array($component)) {
return implode(' ', $component);
diff --git a/src/Components/IntoKeyword.php b/src/Components/IntoKeyword.php
index 1941c22..79c3f3f 100644
--- a/src/Components/IntoKeyword.php
+++ b/src/Components/IntoKeyword.php
@@ -143,7 +143,7 @@ class IntoKeyword extends Component
*
* @return IntoKeyword
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
$ret = new self();
@@ -269,7 +269,7 @@ class IntoKeyword extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if ($component->dest instanceof Expression) {
$columns = ! empty($component->columns) ? '(`' . implode('`, `', $component->columns) . '`)' : '';
diff --git a/src/Components/JoinKeyword.php b/src/Components/JoinKeyword.php
index 330c1f2..9da28e0 100644
--- a/src/Components/JoinKeyword.php
+++ b/src/Components/JoinKeyword.php
@@ -98,9 +98,9 @@ class JoinKeyword extends Component
*
* @return JoinKeyword[]
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
- $ret = [];
+ $ret = array();
$expr = new self();
@@ -212,9 +212,9 @@ class JoinKeyword extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
- $ret = [];
+ $ret = array();
foreach ($component as $c) {
$ret[] = array_search($c->type, static::$JOINS) . ' ' . $c->expr
. (! empty($c->on)
diff --git a/src/Components/Key.php b/src/Components/Key.php
index 37e51a4..e72300f 100644
--- a/src/Components/Key.php
+++ b/src/Components/Key.php
@@ -85,7 +85,7 @@ class Key extends Component
*/
public function __construct(
$name = null,
- array $columns = [],
+ array $columns = array(),
$type = null,
$options = null
) {
@@ -102,7 +102,7 @@ class Key extends Component
*
* @return Key
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
$ret = new self();
@@ -111,7 +111,7 @@ class Key extends Component
*
* @var array
*/
- $lastColumn = [];
+ $lastColumn = array();
/**
* The state of the parser.
@@ -164,7 +164,7 @@ class Key extends Component
$state = ($token->value === ',') ? 2 : 4;
if (! empty($lastColumn)) {
$ret->columns[] = $lastColumn;
- $lastColumn = [];
+ $lastColumn = array();
}
}
} else {
@@ -194,14 +194,14 @@ class Key extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
$ret = $component->type . ' ';
if (! empty($component->name)) {
$ret .= Context::escape($component->name) . ' ';
}
- $columns = [];
+ $columns = array();
foreach ($component->columns as $column) {
$tmp = Context::escape($column['name']);
if (isset($column['length'])) {
diff --git a/src/Components/Limit.php b/src/Components/Limit.php
index edb25fb..85412fd 100644
--- a/src/Components/Limit.php
+++ b/src/Components/Limit.php
@@ -53,7 +53,7 @@ class Limit extends Component
*
* @return Limit
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
$ret = new self();
@@ -121,7 +121,7 @@ class Limit extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
return $component->offset . ', ' . $component->rowCount;
}
diff --git a/src/Components/LockExpression.php b/src/Components/LockExpression.php
index 8bf03ce..c1ee848 100644
--- a/src/Components/LockExpression.php
+++ b/src/Components/LockExpression.php
@@ -41,7 +41,7 @@ class LockExpression extends Component
*
* @return CaseExpression
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
$ret = new self();
@@ -103,7 +103,7 @@ class LockExpression extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (is_array($component)) {
return implode(', ', $component);
diff --git a/src/Components/OptionsArray.php b/src/Components/OptionsArray.php
index f872b14..40b07a3 100644
--- a/src/Components/OptionsArray.php
+++ b/src/Components/OptionsArray.php
@@ -26,7 +26,7 @@ class OptionsArray extends Component
*
* @var array
*/
- public $options = [];
+ public $options = array();
/**
* Constructor.
@@ -35,7 +35,7 @@ class OptionsArray extends Component
* must be an array with at least two keys `name` and
* `expr` or `value`.
*/
- public function __construct(array $options = [])
+ public function __construct(array $options = array())
{
$this->options = $options;
}
@@ -47,7 +47,7 @@ class OptionsArray extends Component
*
* @return OptionsArray
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
$ret = new self();
@@ -276,13 +276,13 @@ class OptionsArray extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (empty($component->options)) {
return '';
}
- $options = [];
+ $options = array();
foreach ($component->options as $option) {
if (! is_array($option)) {
$options[] = $option;
diff --git a/src/Components/OrderKeyword.php b/src/Components/OrderKeyword.php
index 820fdd1..81a408c 100644
--- a/src/Components/OrderKeyword.php
+++ b/src/Components/OrderKeyword.php
@@ -53,9 +53,9 @@ class OrderKeyword extends Component
*
* @return OrderKeyword[]
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
- $ret = [];
+ $ret = array();
$expr = new self();
@@ -129,7 +129,7 @@ class OrderKeyword extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (is_array($component)) {
return implode(', ', $component);
diff --git a/src/Components/ParameterDefinition.php b/src/Components/ParameterDefinition.php
index d4165ee..4cd5023 100644
--- a/src/Components/ParameterDefinition.php
+++ b/src/Components/ParameterDefinition.php
@@ -63,9 +63,9 @@ class ParameterDefinition extends Component
*
* @return ParameterDefinition[]
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
- $ret = [];
+ $ret = array();
$expr = new self();
@@ -153,7 +153,7 @@ class ParameterDefinition extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (is_array($component)) {
return '(' . implode(', ', $component) . ')';
diff --git a/src/Components/PartitionDefinition.php b/src/Components/PartitionDefinition.php
index 58223ea..b07317a 100644
--- a/src/Components/PartitionDefinition.php
+++ b/src/Components/PartitionDefinition.php
@@ -117,7 +117,7 @@ class PartitionDefinition extends Component
*
* @return PartitionDefinition
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
$ret = new self();
@@ -226,7 +226,7 @@ class PartitionDefinition extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (is_array($component)) {
return "(\n" . implode(",\n", $component) . "\n)";
diff --git a/src/Components/Reference.php b/src/Components/Reference.php
index 4077f77..3cec28f 100644
--- a/src/Components/Reference.php
+++ b/src/Components/Reference.php
@@ -69,7 +69,7 @@ class Reference extends Component
* @param array $columns the columns referenced
* @param OptionsArray $options the options
*/
- public function __construct($table = null, array $columns = [], $options = null)
+ public function __construct($table = null, array $columns = array(), $options = null)
{
$this->table = $table;
$this->columns = $columns;
@@ -83,7 +83,7 @@ class Reference extends Component
*
* @return Reference
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
$ret = new self();
@@ -151,7 +151,7 @@ class Reference extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
return trim(
$component->table
diff --git a/src/Components/RenameOperation.php b/src/Components/RenameOperation.php
index d11a187..169d6f7 100644
--- a/src/Components/RenameOperation.php
+++ b/src/Components/RenameOperation.php
@@ -53,9 +53,9 @@ class RenameOperation extends Component
*
* @return RenameOperation[]
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
- $ret = [];
+ $ret = array();
$expr = new self();
@@ -171,7 +171,7 @@ class RenameOperation extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (is_array($component)) {
return implode(', ', $component);
diff --git a/src/Components/SetOperation.php b/src/Components/SetOperation.php
index 4c8ced3..a4a55cc 100644
--- a/src/Components/SetOperation.php
+++ b/src/Components/SetOperation.php
@@ -53,9 +53,9 @@ class SetOperation extends Component
*
* @return SetOperation[]
*/
- public static function parse(Parser $parser, TokensList $list, array $options = [])
+ public static function parse(Parser $parser, TokensList $list, array $options = array())
{
- $ret = [];
+ $ret = array();
$expr = new self();
@@ -150,7 +150,7 @@ class SetOperation extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
if (is_array($component)) {
return implode(', ', $component);
diff --git a/src/Components/UnionKeyword.php b/src/Components/UnionKeyword.php
index dc06831..e3768bc 100644
--- a/src/Components/UnionKeyword.php
+++ b/src/Components/UnionKeyword.php
@@ -23,9 +23,9 @@ class UnionKeyword extends Component
*
* @return string
*/
- public static function build($component, array $options = [])
+ public static function build($component, array $options = array())
{
- $tmp = [];
+ $tmp = array();
foreach ($component as $componentPart) {
$tmp[] = $componentPart[0] . ' ' . $componentPart[1];
}