Remove @return docblock with same type as defined in PHP
use stdClass;
class SomeClass
{
- /**
- * @return stdClass
- */
public function foo(): stdClass
{
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
return RectorConfig::configure()
->withRules([
RemoveUselessReturnTagRector::class,
]);