From e5bf8aa6a0ad4f98a3ada95694762096ad857eea Mon Sep 17 00:00:00 2001 From: TomasVotruba Date: Sun, 29 Dec 2019 13:00:38 +0100 Subject: [PATCH] README: add docs for #2087 --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index b9ef69b5aa1..a5797ade9f3 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: