Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Aug 14, 2021
1 parent a447976 commit 6cc5ba9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,12 @@ private static function handleMicDrop(
$parent_source = $statements_analyzer->getSource();

$functionlike_storage = $parent_source instanceof \Psalm\Internal\Analyzer\FunctionLikeAnalyzer
? $parent_source->getFunctionLikeStorage()
? $parent_source->getFunctionLikeStorage($statements_analyzer)
: null;

if (!$parent_source instanceof \Psalm\Internal\Analyzer\FunctionLikeAnalyzer
if (!$functionlike_storage
|| (!$parent_source->getSource() instanceof \Psalm\Internal\Analyzer\TraitAnalyzer
&& (!$functionlike_storage
|| !isset($functionlike_storage->param_lookup[substr($var_id, 1)])))
&& !isset($functionlike_storage->param_lookup[substr($var_id, 1)]))
) {
$codebase = $statements_analyzer->getCodebase();
$codebase->analyzer->decrementMixedCount($statements_analyzer->getFilePath());
Expand Down

0 comments on commit 6cc5ba9

Please sign in to comment.