From 967b51d5fc802ce503b9561f9b0893e05ce81a2c Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Wed, 21 Jun 2017 16:36:45 -0400 Subject: [PATCH] Make sure that traits are listed as analyzable so issues can be shown --- src/Psalm/Checker/ClassLikeChecker.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Psalm/Checker/ClassLikeChecker.php b/src/Psalm/Checker/ClassLikeChecker.php index 4c7b3dcf3..cd794e717 100644 --- a/src/Psalm/Checker/ClassLikeChecker.php +++ b/src/Psalm/Checker/ClassLikeChecker.php @@ -792,6 +792,12 @@ abstract class ClassLikeChecker extends SourceChecker implements StatementsSourc } } + if ($source instanceof TraitChecker) { + $checked_file_path = $source->getCheckedFilePath(); + $project_checker = $this->getFileChecker()->project_checker; + $project_checker->registerAnalyzableFile($checked_file_path); + } + $method_checker->analyze( clone $class_context, $global_context ? clone $global_context : null