Skip to content

Conversation

@samsonasik
Copy link
Member

The following code:

final class SkipNonTypedPropertyNoDefaultValueNeverAssigned
{
    /** @var array */
    public $property;

    public function isEmpty(): bool
    {
        return empty($this->property);
    }
}

as it has no default value, never assigned, and only rely on docblock which lead to check null value.

@samsonasik
Copy link
Member Author

as AssignToPropertyTypeInferer service is used in TypedPropertyFromAssignsRector too, I add test for non-typed property has default value never assigned 75ae834

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba
Copy link
Member

Thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants