Skip to content

Conversation

@TomasVotruba
Copy link
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
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
Member

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

@samsonasik
Copy link
Member

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