Skip to content

[exp] [unambiguous] Add FluentSettersToStandaloneCallMethodRector#7625

Merged
TomasVotruba merged 1 commit intomainfrom
tv-remove-fluency-2
Nov 13, 2025
Merged

[exp] [unambiguous] Add FluentSettersToStandaloneCallMethodRector#7625
TomasVotruba merged 1 commit intomainfrom
tv-remove-fluency-2

Conversation

@TomasVotruba
Copy link
Copy Markdown
Member

No description provided.

@TomasVotruba TomasVotruba force-pushed the tv-remove-fluency-2 branch 2 times, most recently from ce93426 to 016a864 Compare November 13, 2025 20:30
@TomasVotruba TomasVotruba merged commit 86e4ac9 into main Nov 13, 2025
54 checks passed
@TomasVotruba TomasVotruba deleted the tv-remove-fluency-2 branch November 13, 2025 20:48
@VincentLanglet
Copy link
Copy Markdown
Contributor

What if setName returns another entity ?

class SomeSetterClass
{
     public function setName(): Bar
     { return new Bar(); }
}

class Bar
{
     public function setSurname(): self
     { return $this; }
}

The rule is breaking the code:

(new SomeSetterClass())
            ->setName('John')
            ->setSurname('Doe')

no ?

@samsonasik
Copy link
Copy Markdown
Member

@VincentLanglet oh, that's indeed cause invalid change https://getrector.com/demo/b6d4bf00-0c38-48fb-9bda-efdd12a21b8d

@samsonasik
Copy link
Copy Markdown
Member

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants