Skip to content

Commit 3827f63

Browse files
committed
Fix deprecations
1 parent 2715e6d commit 3827f63

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"require-dev": {
2323
"friendsofphp/php-cs-fixer": "^3.41",
2424
"nikic/php-parser": "^4.0",
25+
"phpstan/extension-installer": "^1.4",
26+
"phpstan/phpstan-deprecation-rules": "^1.2",
2527
"phpunit/phpunit": "^9 || ^10.5",
2628
"redaxo/php-cs-fixer-config": "^1.0"
2729
},

src/TodoByTicketCollector.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ public function processNode(Node $node, Scope $scope)
3333

3434
$tickets = [];
3535
foreach ($it as $comment => $matches) {
36-
// use deprecated method for nikic/php-parser 4.x compat
37-
$line = $comment->getLine();
38-
3936
$text = $comment->getText();
4037
$startLine = $comment->getStartLine();
4138

@@ -49,8 +46,8 @@ public function processNode(Node $node, Scope $scope)
4946
$startLine,
5047
$ticketKey,
5148
$todoText,
52-
$match[0][1], // wholeMatchStartOffset
53-
$line,
49+
$match[0][1], // wholeMatchStartOffset,
50+
$startLine,
5451
];
5552
}
5653
}

0 commit comments

Comments
 (0)