Skip to content

Commit

Permalink
Fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 4, 2024
1 parent 1ccec91 commit 8e2c8b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Rules/Functions/ClosureUsesThisRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function processNode(Node $node, Scope $scope): array
}

$messages[] = RuleErrorBuilder::message(sprintf('Anonymous function uses $this assigned to variable $%s. Use $this directly in the function body.', $closureUse->var->name))
->line($closureUse->getLine())
->line($closureUse->getStartLine())
->identifier('closure.useThis')
->build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function processNode(Node $node, Scope $scope): array
$this->printer->prettyPrintExpr($case->cond),
$caseType->describe(VerbosityLevel::typeOnly()),
))
->line($case->getLine())
->line($case->getStartLine())
->identifier('switch.type')
->build();
}
Expand Down

0 comments on commit 8e2c8b0

Please sign in to comment.