README: add docs for #2087 (#2519)

README: add docs for #2087
This commit is contained in:
Tomas Votruba 2019-12-29 13:06:16 +01:00 committed by GitHub
commit 214c69e1ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: