Skip to content

Commit

Permalink
Only emit mixed issues for MissingClassPropertyType
Browse files Browse the repository at this point in the history
Fixes #2388
  • Loading branch information
muglug committed Mar 6, 2020
1 parent 7ea06c7 commit 51bfc7c
Showing 1 changed file with 15 additions and 9 deletions.
Expand Up @@ -790,15 +790,21 @@ public static function analyzeInstance(
);

if (!$class_property_type) {
if (IssueBuffer::accepts(
new MissingPropertyType(
'Property ' . $fq_class_name . '::$' . $prop_name
. ' does not have a declared type',
new CodeLocation($statements_analyzer->getSource(), $stmt)
),
$statements_analyzer->getSuppressedIssues()
)) {
// fall through
if ($declaring_class_storage->location
&& $config->isInProjectDirs(
$declaring_class_storage->location->file_path
)
) {
if (IssueBuffer::accepts(
new MissingPropertyType(
'Property ' . $fq_class_name . '::$' . $prop_name
. ' does not have a declared type',
new CodeLocation($statements_analyzer->getSource(), $stmt)
),
$statements_analyzer->getSuppressedIssues()
)) {
// fall through
}
}

$class_property_type = Type::getMixed();
Expand Down

0 comments on commit 51bfc7c

Please sign in to comment.