Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converted MissingPropertyType to property issue #4099

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
3 changes: 2 additions & 1 deletion src/Psalm/Internal/Analyzer/ClassAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1710,7 +1710,8 @@ private function checkForMissingPropertyType(
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()
)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,8 @@ public static function analyze(
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()
)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Issue/MissingPropertyType.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Psalm\Issue;

class MissingPropertyType extends CodeIssue
class MissingPropertyType extends PropertyIssue
{
const ERROR_LEVEL = 2;
const SHORTCODE = 45;
Expand Down