Skip to content

Commit

Permalink
Fix codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrala committed Nov 23, 2023
1 parent 2955362 commit 47de7e3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Parser/DeprecatedHelperVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
use PhpParser\NodeVisitor;
use PhpParser\NodeVisitorAbstract;

class DeprecatedHelperVisitor extends NodeVisitorAbstract implements NodeVisitor {
class DeprecatedHelperVisitor extends NodeVisitorAbstract implements NodeVisitor
{

private ?Node\Arg $deprecatedCall = null;

public function enterNode(Node $node) {
public function enterNode(Node $node)
{

if ($node instanceof Node\Expr\StaticCall) {

if ($node->class instanceof Node\Name\FullyQualified && $node->class->isFullyQualified() && $node->class->toString() === 'Drupal\Component\Utility\DeprecationHelper') {
$this->deprecatedCall = $node->getArgs()[2];
return null;
Expand All @@ -27,14 +28,13 @@ public function enterNode(Node $node) {
}

return null;

}

private function isSavedArgument(Node\Arg $node): bool {
private function isSavedArgument(Node\Arg $node): bool
{
if ($this->deprecatedCall !== null && $node->getAttributes() === $this->deprecatedCall->getAttributes()) {
return true;
}
return false;
}

}

0 comments on commit 47de7e3

Please sign in to comment.