Skip to content
Permalink
Browse files

Fix parameter offset for error

  • Loading branch information...
muglug committed May 13, 2019
1 parent fe0f352 commit f33745ad250df6c61a1cc11db367eb16757b3bbf
Showing with 3 additions and 2 deletions.
  1. +1 −1 src/Psalm/Internal/Codebase/ClassLikes.php
  2. +2 −1 tests/UnusedCodeTest.php
@@ -946,7 +946,7 @@ private function checkMethodReferences(ClassLikeStorage $classlike_storage, Meth
) {
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 @@ public function foo(int $i) {}
}
(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

0 comments on commit f33745a

Please sign in to comment.
You can’t perform that action at this time.