diff --git a/rules-tests/EarlyReturn/Rector/StmtsAwareInterface/ReturnEarlyIfVariableRector/Fixture/skip_with_var_doc.php.inc b/rules-tests/EarlyReturn/Rector/StmtsAwareInterface/ReturnEarlyIfVariableRector/Fixture/skip_with_var_doc.php.inc new file mode 100644 index 00000000000..decc1e1c5ee --- /dev/null +++ b/rules-tests/EarlyReturn/Rector/StmtsAwareInterface/ReturnEarlyIfVariableRector/Fixture/skip_with_var_doc.php.inc @@ -0,0 +1,16 @@ +phpDocInfoFactory->createFromNodeOrEmpty($onlyIfStmt); + if ($phpDocInfo->getVarTagValueNode() instanceof VarTagValueNode) { + return null; + } + $assign = $onlyIfStmt->expr; // assign to same variable that is returned