From 03cf74ce31b2719897d9499cd5f2743250f7079f Mon Sep 17 00:00:00 2001 From: TomasVotruba Date: Thu, 18 Jun 2020 01:12:19 +0200 Subject: [PATCH] add static call check --- .../src/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rules/coding-style/src/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php b/rules/coding-style/src/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php index 4b5162dd693..3287c58ca97 100644 --- a/rules/coding-style/src/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php +++ b/rules/coding-style/src/Rector/ClassMethod/NewlineBeforeNewAssignSetRector.php @@ -8,6 +8,7 @@ use PhpParser\Node; use PhpParser\Node\Expr\Assign; use PhpParser\Node\Expr\Closure; use PhpParser\Node\Expr\MethodCall; +use PhpParser\Node\Expr\StaticCall; use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Expression; use PhpParser\Node\Stmt\Function_; @@ -92,7 +93,7 @@ PHP continue; } - if (! $stmt->var instanceof MethodCall) { + if (! $stmt->var instanceof MethodCall && ! $stmt->var instanceof StaticCall) { $currentStmtVariableName = $this->getName($stmt->var); } }