Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
Remove PARENT_NODE (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba authored Jul 8, 2023
1 parent 328268d commit 2ea9c28
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/vendor
composer.lock
.phpunit.result.cache
.phpunit.cache
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"symplify/easy-ci": "^11.2",
"symplify/phpstan-extensions": "^11.2",
"tomasvotruba/unused-public": "^0.1",
"tomasvotruba/type-coverage": "^0.2.0"
"tomasvotruba/type-coverage": "^0.2"
},
"autoload": {
"psr-4": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ final class GetAttributeReturnTypeExtension implements DynamicMethodReturnTypeEx
'Rector\NodeTypeResolver\Node\AttributeKey::SCOPE' => Scope::class,
# Node
'Rector\NodeTypeResolver\Node\AttributeKey::ORIGINAL_NODE' => Node::class,
'Rector\NodeTypeResolver\Node\AttributeKey::PARENT_NODE' => Node::class,
];

public function getClass(): string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,5 @@ use Rector\NodeTypeResolver\Node\AttributeKey;

$node = new String_('value');

$parentNode = $node->getAttribute(AttributeKey::PARENT_NODE);
\PHPStan\Testing\assertType('PhpParser\Node|null', $parentNode);

$scope = $node->getAttribute(AttributeKey::SCOPE);
\PHPStan\Testing\assertType('PHPStan\Analyser\Scope|null', $scope);

0 comments on commit 2ea9c28

Please sign in to comment.