Skip to content

Commit 8e2c8b0

Browse files
committed
Fix deprecations
1 parent 1ccec91 commit 8e2c8b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Rules/Functions/ClosureUsesThisRule.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function processNode(Node $node, Scope $scope): array
4242
}
4343

4444
$messages[] = RuleErrorBuilder::message(sprintf('Anonymous function uses $this assigned to variable $%s. Use $this directly in the function body.', $closureUse->var->name))
45-
->line($closureUse->getLine())
45+
->line($closureUse->getStartLine())
4646
->identifier('closure.useThis')
4747
->build();
4848
}

src/Rules/SwitchConditions/MatchingTypeInSwitchCaseConditionRule.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function processNode(Node $node, Scope $scope): array
4949
$this->printer->prettyPrintExpr($case->cond),
5050
$caseType->describe(VerbosityLevel::typeOnly()),
5151
))
52-
->line($case->getLine())
52+
->line($case->getStartLine())
5353
->identifier('switch.type')
5454
->build();
5555
}

0 commit comments

Comments
 (0)