Skip to content

Commit

Permalink
[NodeTypeResolver] Remove AttributeKey::IS_RETURN_EXPR from ContextNo…
Browse files Browse the repository at this point in the history
…deVisitor (#4502)

Co-authored-by: GitHub Action <actions@github.com>
  • Loading branch information
samsonasik and actions-user committed Jul 13, 2023
1 parent a10ddea commit 898d599
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
5 changes: 0 additions & 5 deletions packages/NodeTypeResolver/Node/AttributeKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,6 @@ final class AttributeKey
*/
public const IS_NEW_INSTANCE_NAME = 'is_new_instance_name';

/**
* @var string
*/
public const IS_RETURN_EXPR = 'is_return_expr';

/**
* @var string
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use PhpParser\Node;
use PhpParser\Node\Arg;
use PhpParser\Node\Attribute;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\Closure;
Expand All @@ -26,7 +25,6 @@
use PhpParser\Node\Stmt\Foreach_;
use PhpParser\Node\Stmt\Function_;
use PhpParser\Node\Stmt\If_;
use PhpParser\Node\Stmt\Return_;
use PhpParser\Node\Stmt\Unset_;
use PhpParser\Node\Stmt\While_;
use PhpParser\NodeTraverser;
Expand Down Expand Up @@ -69,11 +67,6 @@ public function enterNode(Node $node): ?Node
return null;
}

if ($node instanceof Return_ && $node->expr instanceof Expr) {
$node->expr->setAttribute(AttributeKey::IS_RETURN_EXPR, true);
return null;
}

if ($node instanceof Arg) {
$node->value->setAttribute(AttributeKey::IS_ARG_VALUE, true);
return null;
Expand Down

0 comments on commit 898d599

Please sign in to comment.