Skip to content

Commit

Permalink
[5.7] Apply `square bracket syntax for array destructuring assignment…
Browse files Browse the repository at this point in the history
…` (#25966)

Apply `square bracket syntax for array destructuring assignment`, for more information please look into https://wiki.php.net/rfc/short_list_syntax

This rfc was implemented in PHP v7.1. Laravel support php from the 7.1.3
  • Loading branch information
TBlindaruk authored and taylorotwell committed Oct 6, 2018
1 parent c4a3d3d commit e04e4e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Command.php
Expand Up @@ -123,7 +123,7 @@ public function __construct()
*/
protected function configureUsingFluentDefinition()
{
list($name, $arguments, $options) = Parser::parse($this->signature);
[$name, $arguments, $options] = Parser::parse($this->signature);

parent::__construct($this->name = $name);

Expand Down
4 changes: 2 additions & 2 deletions Parser.php
Expand Up @@ -82,7 +82,7 @@ protected static function parameters(array $tokens)
*/
protected static function parseArgument($token)
{
list($token, $description) = static::extractDescription($token);
[$token, $description] = static::extractDescription($token);

switch (true) {
case Str::endsWith($token, '?*'):
Expand All @@ -108,7 +108,7 @@ protected static function parseArgument($token)
*/
protected static function parseOption($token)
{
list($token, $description) = static::extractDescription($token);
[$token, $description] = static::extractDescription($token);

$matches = preg_split('/\s*\|\s*/', $token, 2);

Expand Down

0 comments on commit e04e4e2

Please sign in to comment.