Avoid redundant argument

This commit is contained in:
Nikita Popov 2019-01-12 17:25:39 +01:00
parent ba092652fe
commit 6b9dd7afe7
2 changed files with 2 additions and 2 deletions

View File

@ -537,7 +537,7 @@ class_statement_list:
class_statement:
variable_modifiers optional_type property_declaration_list ';'
{ $attrs = attributes();
$$ = Stmt\Property[$1, $3, $attrs, $2]; $this->checkProperty($$, #1); }
$$ = new Stmt\Property($1, $3, $attrs, $2); $this->checkProperty($$, #1); }
| method_modifiers T_CONST class_const_list ';'
{ $$ = Stmt\ClassConst[$3, $1]; $this->checkClassConst($$, #1); }
| method_modifiers T_FUNCTION optional_ref identifier_ex '(' parameter_list ')' optional_return_type method_body

View File

@ -1683,7 +1683,7 @@ class Php7 extends \PhpParser\ParserAbstract
},
273 => function ($stackPos) {
$attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes;
$this->semValue = new Stmt\Property($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $attrs, $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $stackPos-(4-1));
$this->semValue = new Stmt\Property($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $attrs, $this->semStack[$stackPos-(4-2)]); $this->checkProperty($this->semValue, $stackPos-(4-1));
},
274 => function ($stackPos) {
$this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkClassConst($this->semValue, $stackPos-(4-1));