Find the best Rector rule to solve your problem. Searching through 1004 rules.
Found 4 rules, grouped by set: Clear
Privatization
4 matches
Privatize getter of local property to property
class SomeClass
{
private $some;
public function run()
{
- return $this->getSome() + 5;
+ return $this->some + 5;
}
private function getSome()
{
return $this->some;
}
}
Change property to private if possible
final class SomeClass
{
- protected $value;
+ private $value;
}
Change protected constant to private if possible
final class SomeClass
{
- protected const SOME_CONSTANT = 'some-value';
+ private const SOME_CONSTANT = 'some-value';
}
Change protected class method to private if possible
final class SomeClass
{
- protected function someMethod()
+ private function someMethod()
{
}
}