Skip to content

[TypeDeclaration] Add typed property based on serialize attribute #8652

@TomasVotruba

Description

@TomasVotruba

This rule is simple, the JMS annotations state exact type, that can be added to the property.
If on PHH 8.0+ (due to attributes, lets skip annotations to keep rule simple and more reliable), we can add known typed property:

 [JMS\Type('string')]
-private $name;
+private ?string $name = null;

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions