mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Converted MissingPropertyType to property issue (#4099)
Fixes vimeo/psalm#2200
This commit is contained in:
parent
aa09a1c780
commit
ffb316a9e6
@ -264,7 +264,7 @@
|
||||
<xs:element name="MissingFile" type="IssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="MissingImmutableAnnotation" type="IssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="MissingParamType" type="IssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="MissingPropertyType" type="IssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="MissingPropertyType" type="PropertyIssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="MissingReturnType" type="IssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="MissingTemplateParam" type="IssueHandlerType" minOccurs="0" />
|
||||
<xs:element name="MissingThrowsDocblock" type="IssueHandlerType" minOccurs="0" />
|
||||
|
@ -1710,7 +1710,8 @@ class ClassAnalyzer extends ClassLikeAnalyzer
|
||||
if (IssueBuffer::accepts(
|
||||
new MissingPropertyType(
|
||||
$message,
|
||||
new CodeLocation($source, $stmt->props[0]->name)
|
||||
new CodeLocation($source, $stmt->props[0]->name),
|
||||
$property_id
|
||||
),
|
||||
$this->source->getSuppressedIssues()
|
||||
)) {
|
||||
|
@ -965,7 +965,8 @@ class InstancePropertyFetchAnalyzer
|
||||
new MissingPropertyType(
|
||||
'Property ' . $fq_class_name . '::$' . $prop_name
|
||||
. ' does not have a declared type',
|
||||
new CodeLocation($statements_analyzer->getSource(), $stmt)
|
||||
new CodeLocation($statements_analyzer->getSource(), $stmt),
|
||||
$property_id
|
||||
),
|
||||
$statements_analyzer->getSuppressedIssues()
|
||||
)) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace Psalm\Issue;
|
||||
|
||||
class MissingPropertyType extends CodeIssue
|
||||
class MissingPropertyType extends PropertyIssue
|
||||
{
|
||||
const ERROR_LEVEL = 2;
|
||||
const SHORTCODE = 45;
|
||||
|
Loading…
x
Reference in New Issue
Block a user