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

[type-declaration] Add typed property, if traits do not duplicate the property #6663

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Jan 9, 2025

No description provided.

@TomasVotruba TomasVotruba changed the title tv allow trait [type-declaration] Add typed property, if traits do not duplicate the property Jan 9, 2025
@TomasVotruba TomasVotruba merged commit 8da1bfe into main Jan 9, 2025
41 checks passed
@TomasVotruba TomasVotruba deleted the tv-allow-trait branch January 9, 2025 20:26
return (bool) $this->betterNodeFinder->findFirst(
$trait,
function (Node $node) use ($propertyName): bool {
if (! $node instanceof Assign) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should cover assign op, eg $this->props .= "append"; as well, using attribute key is_being_assigned should be more reliable.

public function isLeftPartOfAssign(Node $node): bool

Also needs to verify if property is being unset() via trait.

, i will check it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants