Skip to content

Commit

Permalink
Don't report deprecations for deprecated anonymous classes in a depre…
Browse files Browse the repository at this point in the history
…cated scope
  • Loading branch information
iluuu1994 committed Jun 24, 2018
1 parent 2ac49f5 commit ae3a842
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ public function getNodeType(): string
*/
public function processNode(Node $node, Scope $scope): array
{
if (DeprecatedScopeHelper::isScopeDeprecated($scope)) {
return [];
}

$errors = [];

$className = isset($node->namespacedName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,6 @@ public function testImplementationOfDeprecatedInterfacesInAnonymousClasses(): vo
'Anonymous class implements deprecated interface ImplementationOfDeprecatedInterface\DeprecatedFooable2.',
13,
],
[
'Anonymous class implements deprecated interface ImplementationOfDeprecatedInterface\DeprecatedFooable.',
26,
],
[
'Anonymous class implements deprecated interface ImplementationOfDeprecatedInterface\DeprecatedFooable.',
30,
],
[
'Anonymous class implements deprecated interface ImplementationOfDeprecatedInterface\DeprecatedFooable2.',
30,
],
[
'Anonymous class implements deprecated interface ImplementationOfDeprecatedInterface\DeprecatedFooable.',
47,
],
[
'Anonymous class implements deprecated interface ImplementationOfDeprecatedInterface\DeprecatedFooable.',
51,
],
[
'Anonymous class implements deprecated interface ImplementationOfDeprecatedInterface\DeprecatedFooable2.',
51,
],
]
);
}
Expand Down

0 comments on commit ae3a842

Please sign in to comment.