diff --git a/src/Components/AlterOperation.php b/src/Components/AlterOperation.php index 9d2393ab1..2b83ae540 100644 --- a/src/Components/AlterOperation.php +++ b/src/Components/AlterOperation.php @@ -181,7 +181,7 @@ public function __construct( */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = new self(); + $ret = new static(); /** * Counts brackets. diff --git a/src/Components/ArrayObj.php b/src/Components/ArrayObj.php index 7748be92c..6b90a3faa 100644 --- a/src/Components/ArrayObj.php +++ b/src/Components/ArrayObj.php @@ -55,7 +55,7 @@ public function __construct(array $raw = [], array $values = []) */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = empty($options['type']) ? new self() : []; + $ret = empty($options['type']) ? new static() : []; /** * The last raw expression. diff --git a/src/Components/CaseExpression.php b/src/Components/CaseExpression.php index 309f0ff91..4bd347dc6 100644 --- a/src/Components/CaseExpression.php +++ b/src/Components/CaseExpression.php @@ -86,7 +86,7 @@ public function __construct() */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = new self(); + $ret = new static(); /** * State of parser. diff --git a/src/Components/Condition.php b/src/Components/Condition.php index c37ce1984..4ad98646e 100644 --- a/src/Components/Condition.php +++ b/src/Components/Condition.php @@ -101,7 +101,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = { $ret = []; - $expr = new self(); + $expr = new static(); /** * Counts brackets. @@ -159,12 +159,12 @@ public static function parse(Parser $parser, TokensList $list, array $options = } // Adding the operator. - $expr = new self($token->value); + $expr = new static($token->value); $expr->isOperator = true; $ret[] = $expr; // Preparing to parse another condition. - $expr = new self(); + $expr = new static(); continue; } } diff --git a/src/Components/CreateDefinition.php b/src/Components/CreateDefinition.php index 3d3a3f425..388a08061 100644 --- a/src/Components/CreateDefinition.php +++ b/src/Components/CreateDefinition.php @@ -176,7 +176,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = { $ret = []; - $expr = new self(); + $expr = new static(); /** * The state of the parser. @@ -285,7 +285,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = if (! empty($expr->type) || ! empty($expr->key)) { $ret[] = $expr; } - $expr = new self(); + $expr = new static(); if ($token->value === ',') { $state = 1; } elseif ($token->value === ')') { diff --git a/src/Components/DataType.php b/src/Components/DataType.php index 5be45c6e3..8218e5b6e 100644 --- a/src/Components/DataType.php +++ b/src/Components/DataType.php @@ -98,7 +98,7 @@ public function __construct( */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = new self(); + $ret = new static(); /** * The state of the parser. diff --git a/src/Components/Expression.php b/src/Components/Expression.php index 7a71c7629..9c21def52 100644 --- a/src/Components/Expression.php +++ b/src/Components/Expression.php @@ -157,7 +157,7 @@ public function __construct($database = null, $table = null, $column = null, $al */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = new self(); + $ret = new static(); /** * Whether current tokens make an expression or a table reference. diff --git a/src/Components/FunctionCall.php b/src/Components/FunctionCall.php index 382ee8fc6..073b0e373 100644 --- a/src/Components/FunctionCall.php +++ b/src/Components/FunctionCall.php @@ -59,7 +59,7 @@ public function __construct($name = null, $parameters = null) */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = new self(); + $ret = new static(); /** * The state of the parser. diff --git a/src/Components/GroupKeyword.php b/src/Components/GroupKeyword.php index 9aa583dfe..bef1ebef6 100644 --- a/src/Components/GroupKeyword.php +++ b/src/Components/GroupKeyword.php @@ -48,7 +48,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = { $ret = []; - $expr = new self(); + $expr = new static(); /** * The state of the parser. @@ -96,7 +96,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = if (! empty($expr->expr)) { $ret[] = $expr; } - $expr = new self(); + $expr = new static(); $state = 0; } else { break; diff --git a/src/Components/IndexHint.php b/src/Components/IndexHint.php index a0cb0f1ae..748417229 100644 --- a/src/Components/IndexHint.php +++ b/src/Components/IndexHint.php @@ -74,7 +74,7 @@ public function __construct(string $type = null, string $indexOrKey = null, stri public static function parse(Parser $parser, TokensList $list, array $options = []) { $ret = []; - $expr = new self(); + $expr = new static(); $expr->type = isset($options['type']) ? $options['type'] : null; /** * The state of the parser. @@ -143,7 +143,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = $expr->indexes = ExpressionArray::parse($parser, $list); $state = 0; $ret[] = $expr; - $expr = new self(); + $expr = new static(); } break; case 3: @@ -163,7 +163,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = $expr->indexes = ExpressionArray::parse($parser, $list); $state = 0; $ret[] = $expr; - $expr = new self(); + $expr = new static(); break; } } diff --git a/src/Components/IntoKeyword.php b/src/Components/IntoKeyword.php index 1941c22d8..cebfa7a17 100644 --- a/src/Components/IntoKeyword.php +++ b/src/Components/IntoKeyword.php @@ -145,7 +145,7 @@ public function __construct( */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = new self(); + $ret = new static(); /** * The state of the parser. diff --git a/src/Components/JoinKeyword.php b/src/Components/JoinKeyword.php index 330c1f2f1..0c9dd70ce 100644 --- a/src/Components/JoinKeyword.php +++ b/src/Components/JoinKeyword.php @@ -102,7 +102,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = { $ret = []; - $expr = new self(); + $expr = new static(); /** * The state of the parser. @@ -174,7 +174,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = if (! empty(static::$JOINS[$token->keyword]) ) { $ret[] = $expr; - $expr = new self(); + $expr = new static(); $expr->type = static::$JOINS[$token->keyword]; $state = 1; } else { @@ -187,12 +187,12 @@ public static function parse(Parser $parser, TokensList $list, array $options = } elseif ($state === 3) { $expr->on = Condition::parse($parser, $list); $ret[] = $expr; - $expr = new self(); + $expr = new static(); $state = 0; } elseif ($state === 4) { $expr->using = ArrayObj::parse($parser, $list); $ret[] = $expr; - $expr = new self(); + $expr = new static(); $state = 0; } } diff --git a/src/Components/Key.php b/src/Components/Key.php index 37e51a4cd..b924c87a5 100644 --- a/src/Components/Key.php +++ b/src/Components/Key.php @@ -104,7 +104,7 @@ public function __construct( */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = new self(); + $ret = new static(); /** * Last parsed column. diff --git a/src/Components/Limit.php b/src/Components/Limit.php index edb25fb98..e18219df8 100644 --- a/src/Components/Limit.php +++ b/src/Components/Limit.php @@ -55,7 +55,7 @@ public function __construct($rowCount = 0, $offset = 0) */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = new self(); + $ret = new static(); $offset = false; diff --git a/src/Components/LockExpression.php b/src/Components/LockExpression.php index 8bf03ce09..039d011d2 100644 --- a/src/Components/LockExpression.php +++ b/src/Components/LockExpression.php @@ -43,7 +43,7 @@ class LockExpression extends Component */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = new self(); + $ret = new static(); /** * The state of the parser. diff --git a/src/Components/OptionsArray.php b/src/Components/OptionsArray.php index f872b1447..ac6d7dec3 100644 --- a/src/Components/OptionsArray.php +++ b/src/Components/OptionsArray.php @@ -49,7 +49,7 @@ public function __construct(array $options = []) */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = new self(); + $ret = new static(); /** * The ID that will be assigned to duplicate options. diff --git a/src/Components/OrderKeyword.php b/src/Components/OrderKeyword.php index 820fdd198..7d8068302 100644 --- a/src/Components/OrderKeyword.php +++ b/src/Components/OrderKeyword.php @@ -57,7 +57,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = { $ret = []; - $expr = new self(); + $expr = new static(); /** * The state of the parser. @@ -105,7 +105,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = if (! empty($expr->expr)) { $ret[] = $expr; } - $expr = new self(); + $expr = new static(); $state = 0; } else { break; diff --git a/src/Components/ParameterDefinition.php b/src/Components/ParameterDefinition.php index d4165ee97..9294273b3 100644 --- a/src/Components/ParameterDefinition.php +++ b/src/Components/ParameterDefinition.php @@ -67,7 +67,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = { $ret = []; - $expr = new self(); + $expr = new static(); /** * The state of the parser. @@ -127,7 +127,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = $state = 3; } elseif ($state === 3) { $ret[] = $expr; - $expr = new self(); + $expr = new static(); if ($token->value === ',') { $state = 1; } elseif ($token->value === ')') { diff --git a/src/Components/PartitionDefinition.php b/src/Components/PartitionDefinition.php index 58223ea51..e43f765bb 100644 --- a/src/Components/PartitionDefinition.php +++ b/src/Components/PartitionDefinition.php @@ -119,7 +119,7 @@ class PartitionDefinition extends Component */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = new self(); + $ret = new static(); /** * The state of the parser. diff --git a/src/Components/Reference.php b/src/Components/Reference.php index 4077f7738..aac73accf 100644 --- a/src/Components/Reference.php +++ b/src/Components/Reference.php @@ -85,7 +85,7 @@ public function __construct($table = null, array $columns = [], $options = null) */ public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = new self(); + $ret = new static(); /** * The state of the parser. diff --git a/src/Components/RenameOperation.php b/src/Components/RenameOperation.php index d11a1874e..0008a4144 100644 --- a/src/Components/RenameOperation.php +++ b/src/Components/RenameOperation.php @@ -57,7 +57,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = { $ret = []; - $expr = new self(); + $expr = new static(); /** * The state of the parser. @@ -140,7 +140,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = } elseif ($state === 3) { if (($token->type === Token::TYPE_OPERATOR) && ($token->value === ',')) { $ret[] = $expr; - $expr = new self(); + $expr = new static(); $state = 0; } else { break; diff --git a/src/Components/SetOperation.php b/src/Components/SetOperation.php index 4c8ced351..2d767044b 100644 --- a/src/Components/SetOperation.php +++ b/src/Components/SetOperation.php @@ -57,7 +57,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = { $ret = []; - $expr = new self(); + $expr = new static(); /** * The state of the parser. @@ -129,7 +129,7 @@ public static function parse(Parser $parser, TokensList $list, array $options = $expr->column = trim($expr->column); $expr->value = $tmp->expr; $ret[] = $expr; - $expr = new self(); + $expr = new static(); $state = 0; $commaLastSeenAt = null; }