Skip to content
Permalink
Browse files

Get function analyser once per method

  • Loading branch information...
muglug committed May 31, 2019
1 parent cd969c5 commit 84c0554595bec0c65b06afa02a3bdb59fb2bc782
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/Psalm/Internal/Codebase/ClassLikes.php
@@ -931,6 +931,11 @@ private function checkMethodReferences(ClassLikeStorage $classlike_storage, Meth
&& isset($project_analyzer->getIssuesToFix()['MissingParamType'])
) {
if ($method_storage->possible_param_types && $method_storage->location) {
$function_analyzer = $project_analyzer->getFunctionLikeAnalyzer(
$method_id,
$method_storage->location->file_path
);
foreach ($method_storage->possible_param_types as $offset => $possible_type) {
if (!isset($method_storage->params[$offset])) {
continue;
@@ -942,11 +947,6 @@ private function checkMethodReferences(ClassLikeStorage $classlike_storage, Meth
continue;
}
$function_analyzer = $project_analyzer->getFunctionLikeAnalyzer(
$method_id,
$method_storage->location->file_path
);
$function_analyzer->addOrUpdateParamType(
$project_analyzer,
$param_name,

0 comments on commit 84c0554

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