Skip to content

Commit

Permalink
No longer suggest incorrect type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
fredden committed Dec 4, 2023
1 parent 3b05f87 commit 366bd9f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ protected function processParams(File $phpcsFile, $stackPtr, $commentStart)
}
}

if ($suggestedTypeHint !== '' && isset($realParams[$pos]) === true) {
if ($suggestedTypeHint !== '' && isset($realParams[$pos]) === true && $param['var'] !== '') {
$typeHint = $realParams[$pos]['type_hint'];

// Remove namespace prefixes when comparing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ public function getErrorList()
792 => 1,
794 => 1,
797 => 1,
801 => 1,
828 => 1,
840 => 1,
852 => 1,
Expand Down Expand Up @@ -134,10 +133,8 @@ public function getErrorList()
1125 => 1,
1138 => 1,
1139 => 1,
1142 => 1,
1144 => 1,
1145 => 1,
1148 => 1,
1151 => 1,
];

Expand Down

0 comments on commit 366bd9f

Please sign in to comment.