diff --git a/README.md b/README.md index b9ef69b5aa1f..a5797ade9f3f 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,24 @@ parameters: - 'Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector' ``` +Do you want to skip just specific line with specific rule? + +Use `@noRector \FQN name` annotation: + +```php +class SomeClass +{ + /** + * @noRector \Rector\DeadCode\Rector\ClassMethod\RemoveEmptyClassMethodRector + */ + public function foo() + { + /** @noRector \Rector\DeadCode\Rector\Plus\RemoveDeadZeroAndOneOperationRector */ + round(1 + 0); + } +} +``` + ### Provide PHP Version By default Rector uses the language features matching your system version of PHP. You can configure it for a different PHP version: