mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +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(
|
if (IssueBuffer::accepts(
|
||||||
new PossiblyUnusedParam(
|
new PossiblyUnusedParam(
|
||||||
'Param #' . $offset . ' is never referenced in this method',
|
'Param #' . ($offset + 1) . ' is never referenced in this method',
|
||||||
$code_location
|
$code_location
|
||||||
),
|
),
|
||||||
$method_storage->suppressed_issues
|
$method_storage->suppressed_issues
|
||||||
|
@ -419,7 +419,8 @@ class UnusedCodeTest extends TestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
(new A)->foo(4);',
|
(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' => [
|
'unusedParam' => [
|
||||||
'<?php
|
'<?php
|
||||||
|
Loading…
x
Reference in New Issue
Block a user