diff options
Diffstat (limited to 'src/Components/ArrayObj.php')
-rw-r--r-- | src/Components/ArrayObj.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Components/ArrayObj.php b/src/Components/ArrayObj.php index e86ddfd..f968d87 100644 --- a/src/Components/ArrayObj.php +++ b/src/Components/ArrayObj.php @@ -25,14 +25,14 @@ class ArrayObj extends Component * * @var array */ - public $raw = array(); + public $raw = []; /** * The array that contains the processed value of each token. * * @var array */ - public $values = array(); + public $values = []; /** * 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(), array $values = array()) + public function __construct(array $raw = [], array $values = []) { $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 = array()) + public static function parse(Parser $parser, TokensList $list, array $options = []) { - $ret = empty($options['type']) ? new self() : array(); + $ret = empty($options['type']) ? new self() : []; /** * The last raw expression. @@ -144,7 +144,7 @@ class ArrayObj extends Component $ret[] = $options['type']::parse( $parser, $list, - empty($options['typeOptions']) ? array() : $options['typeOptions'] + empty($options['typeOptions']) ? [] : $options['typeOptions'] ); } } @@ -176,11 +176,11 @@ class ArrayObj extends Component * * @return string */ - public static function build($component, array $options = array()) + public static function build($component, array $options = []) { if (is_array($component)) { return implode(', ', $component); - } elseif (!empty($component->raw)) { + } elseif (! empty($component->raw)) { return '(' . implode(', ', $component->raw) . ')'; } |