mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Fix parameter offset for error
This commit is contained in:
parent
fe0f352132
commit
f33745ad25
@ -946,7 +946,7 @@ class ClassLikes
|
||||
) {
|
||||
if (IssueBuffer::accepts(
|
||||
new PossiblyUnusedParam(
|
||||
'Param #' . $offset . ' is never referenced in this method',
|
||||
'Param #' . ($offset + 1) . ' is never referenced in this method',
|
||||
$code_location
|
||||
),
|
||||
$method_storage->suppressed_issues
|
||||
|
@ -419,7 +419,8 @@ class UnusedCodeTest extends TestCase
|
||||
}
|
||||
|
||||
(new A)->foo(4);',
|
||||
'error_message' => 'PossiblyUnusedParam',
|
||||
'error_message' => 'PossiblyUnusedParam - src' . DIRECTORY_SEPARATOR
|
||||
. 'somefile.php:4:49 - Param #1 is never referenced in this method',
|
||||
],
|
||||
'unusedParam' => [
|
||||
'<?php
|
||||
|
Loading…
x
Reference in New Issue
Block a user