Skip to content

Commit

Permalink
[DX] Lower readonly PropertyManipulator complexity (#4429)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jul 6, 2023
1 parent 3962227 commit 1d0feb2
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 497 deletions.
32 changes: 0 additions & 32 deletions packages/NodeNestingScope/ParentScopeFinder.php

This file was deleted.

5 changes: 5 additions & 0 deletions packages/NodeTypeResolver/Node/AttributeKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,9 @@ final class AttributeKey
* @var string
*/
public const FROM_FUNC_CALL_NAME = 'from_func_call_name';

/**
* @var string
*/
public const INSIDE_ARRAY_DIM_FETCH = 'inside_array_dim_fetch';
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use PhpParser\Node\Attribute;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\Array_;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\Closure;
use PhpParser\Node\Expr\Isset_;
use PhpParser\Node\Stmt\Break_;
Expand Down Expand Up @@ -43,6 +44,10 @@ public function enterNode(Node $node): ?Node
return null;
}

if ($node instanceof ArrayDimFetch) {
$node->var->setAttribute(AttributeKey::INSIDE_ARRAY_DIM_FETCH, true);
}

if ($node instanceof Isset_ || $node instanceof Unset_) {
$this->processContextInIssetOrUnset($node);
return null;
Expand Down
20 changes: 0 additions & 20 deletions packages/ReadWrite/Contract/ReadNodeAnalyzerInterface.php

This file was deleted.

42 changes: 0 additions & 42 deletions packages/ReadWrite/NodeAnalyzer/ReadExprAnalyzer.php

This file was deleted.

112 changes: 0 additions & 112 deletions packages/ReadWrite/NodeAnalyzer/ReadWritePropertyAnalyzer.php

This file was deleted.

49 changes: 0 additions & 49 deletions packages/ReadWrite/NodeFinder/NodeUsageFinder.php

This file was deleted.

24 changes: 0 additions & 24 deletions packages/ReadWrite/ReadNodeAnalyzer/JustReadExprAnalyzer.php

This file was deleted.

This file was deleted.

0 comments on commit 1d0feb2

Please sign in to comment.