Configurable

RemoveAnnotationRector

Remove annotation by names

-/**
- * @method getName()
- */
 final class SomeClass
 {
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassLike\RemoveAnnotationRector;

return RectorConfig::configure()
    ->withConfiguredRule(RemoveAnnotationRector::class, [
        'method',
    ]);