Removes defined arguments in defined methods and their calls.
$someObject = new SomeClass;
-$someObject->someMethod(true);
+$someObject->someMethod();
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Removing\Rector\ClassMethod\ArgumentRemoverRector;
use Rector\Removing\ValueObject\ArgumentRemover;
return RectorConfig::configure()
->withConfiguredRule(ArgumentRemoverRector::class, [
new ArgumentRemover('ExampleClass', 'someMethod', 0, [
true,
]),
]);