diff --git a/build/target-repository/docs/rector_rules_overview.md b/build/target-repository/docs/rector_rules_overview.md index a4913108ef4..4f04236e749 100644 --- a/build/target-repository/docs/rector_rules_overview.md +++ b/build/target-repository/docs/rector_rules_overview.md @@ -1,4 +1,4 @@ -# 362 Rules Overview +# 361 Rules Overview
@@ -14,6 +14,8 @@ - [EarlyReturn](#earlyreturn) (9) +- [Instanceof_](#instanceof) (1) + - [Naming](#naming) (6) - [Php52](#php52) (2) @@ -52,7 +54,7 @@ - [Transform](#transform) (22) -- [TypeDeclaration](#typedeclaration) (44) +- [TypeDeclaration](#typedeclaration) (43) - [Visibility](#visibility) (3) @@ -3382,6 +3384,21 @@ Replace if conditioned variable override with direct return
+## Instanceof_ + +### FlipNegatedTernaryInstanceofRector + +Flip negated ternary of instanceof to direct use of object + +- class: [`Rector\Instanceof_\Rector\Ternary\FlipNegatedTernaryInstanceofRector`](../rules/Instanceof_/Rector/Ternary/FlipNegatedTernaryInstanceofRector.php) + +```diff +-echo ! $object instanceof Product ? null : $object->getPrice(); ++echo $object instanceof Product ? $object->getPrice() : null; +``` + +
+ ## Naming ### RenameForeachValueVariableToMatchExprVariableRector @@ -7722,19 +7739,6 @@ Change `empty()` on nullable object to instanceof check
-### FlipNegatedTernaryInstanceofRector - -Flip negated ternary of instanceof to direct use of object - -- class: [`Rector\TypeDeclaration\Rector\Ternary\FlipNegatedTernaryInstanceofRector`](../rules/TypeDeclaration/Rector/Ternary/FlipNegatedTernaryInstanceofRector.php) - -```diff --echo ! $object instanceof Product ? null : $object->getPrice(); -+echo $object instanceof Product ? $object->getPrice() : null; -``` - -
- ### NumericReturnTypeFromStrictScalarReturnsRector Change numeric return type based on strict returns type operations