Skip to content

[DeadCode] Add RemoveSetterOnlyPropertyAndMethodCallRector#1819

Merged
TomasVotruba merged 4 commits intomasterfrom
dead-setter-onlys
Aug 6, 2019
Merged

[DeadCode] Add RemoveSetterOnlyPropertyAndMethodCallRector#1819
TomasVotruba merged 4 commits intomasterfrom
dead-setter-onlys

Conversation

@TomasVotruba
Copy link
Copy Markdown
Member

@TomasVotruba TomasVotruba commented Aug 6, 2019

class SomeClass
{
-    private $name;
-
-    public function setName($name)
-    {
-        $this->name = $name;
-    }
}

 class ActiveOnlySetter
 {
     public function run()
     {
         $someClass = new SomeClass();
-        $someClass->setName('Tom');
     }
 }

This rule would not be possible without @spaceflow-app sponsor, thank you ❤️

@TomasVotruba TomasVotruba force-pushed the dead-setter-onlys branch 2 times, most recently from 4c6df2d to e56cfa8 Compare August 6, 2019 10:24
@TomasVotruba TomasVotruba changed the title [WIP] [DeadCode] Add RemoveSetterOnlyPropertyAndMethodCallRector [DeadCode] Add RemoveSetterOnlyPropertyAndMethodCallRector Aug 6, 2019
@TomasVotruba TomasVotruba merged commit 38b9beb into master Aug 6, 2019
@TomasVotruba TomasVotruba deleted the dead-setter-onlys branch August 6, 2019 12:41
TomasVotruba added a commit that referenced this pull request Feb 15, 2022
rectorphp/rector-src@92d04a5 Deprecate RemovingStatic rules as very narrow use case in generic rules (#1819)
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.

1 participant