summaryrefslogtreecommitdiffstats
path: root/src/Components/CaseExpression.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Components/CaseExpression.php')
-rw-r--r--src/Components/CaseExpression.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Components/CaseExpression.php b/src/Components/CaseExpression.php
index f6b422c..4bd347d 100644
--- a/src/Components/CaseExpression.php
+++ b/src/Components/CaseExpression.php
@@ -1,8 +1,8 @@
<?php
-
/**
* Parses a reference to a CASE expression.
*/
+declare(strict_types=1);
namespace PhpMyAdmin\SqlParser\Components;
@@ -33,21 +33,21 @@ class CaseExpression extends Component
*
* @var array
*/
- public $conditions = array();
+ public $conditions = [];
/**
* The results matching with the WHEN clauses.
*
* @var array
*/
- public $results = array();
+ public $results = [];
/**
* The values to be compared against.
*
* @var array
*/
- public $compare_values = array();
+ public $compare_values = [];
/**
* The result in ELSE section of expr.
@@ -84,9 +84,9 @@ class CaseExpression extends Component
*
* @return CaseExpression
*/
- public static function parse(Parser $parser, TokensList $list, array $options = array())
+ public static function parse(Parser $parser, TokensList $list, array $options = [])
{
- $ret = new self();
+ $ret = new static();
/**
* State of parser.
@@ -216,7 +216,7 @@ class CaseExpression extends Component
if ($token->type === Token::TYPE_DELIMITER) {
break;
}
-
+
// Skipping whitespaces and comments.
if (($token->type === Token::TYPE_WHITESPACE)
|| ($token->type === Token::TYPE_COMMENT)
@@ -279,7 +279,7 @@ class CaseExpression extends Component
*
* @return string
*/
- public static function build($component, array $options = array())
+ public static function build($component, array $options = [])
{
$ret = 'CASE ';
if (isset($component->value)) {