Changes static call to instance call, where not useful
class Something
{
public function doWork()
{
}
}
class Another
{
public function run()
{
- return Something::doWork();
+ return (new Something)->doWork();
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Php70\Rector\StaticCall\StaticCallOnNonStaticToInstanceCallRector;
return RectorConfig::configure()
->withRules([
StaticCallOnNonStaticToInstanceCallRector::class,
]);