From bf8641c49901cfefbee86ee1209e98ce022d9777 Mon Sep 17 00:00:00 2001 From: TomasVotruba Date: Sun, 31 May 2020 17:26:08 +0200 Subject: [PATCH] update docs --- docs/rector_rules_overview.md | 67 +++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/docs/rector_rules_overview.md b/docs/rector_rules_overview.md index 39fd21df911..1d93d792017 100644 --- a/docs/rector_rules_overview.md +++ b/docs/rector_rules_overview.md @@ -1,4 +1,4 @@ -# All 495 Rectors Overview +# All 498 Rectors Overview - [Projects](#projects) - [General](#general) @@ -38,7 +38,7 @@ - [Performance](#performance) (1) - [Phalcon](#phalcon) (4) - [Php52](#php52) (2) -- [Php53](#php53) (2) +- [Php53](#php53) (3) - [Php54](#php54) (2) - [Php55](#php55) (2) - [Php56](#php56) (2) @@ -6632,6 +6632,20 @@ Remove unused private method ## Php53 +### `ClearReturnNewByReferenceRector` + +- class: [`Rector\Php53\Rector\Assign\ClearReturnNewByReferenceRector`](/../master/rules/php53/src/Rector/Assign/ClearReturnNewByReferenceRector.php) +- [test fixtures](/../master/rules/php53/tests/Rector/Assign/ClearReturnNewByReferenceRector/Fixture) + +Remove reference from "$assign = &new Value;" + +```diff +-$assign = &new Value; ++$assign = new Value; +``` + +
+ ### `DirNameFileConstantToDirConstantRector` - class: [`Rector\Php53\Rector\FuncCall\DirNameFileConstantToDirConstantRector`](/../master/rules/php53/src/Rector/FuncCall/DirNameFileConstantToDirConstantRector.php) @@ -10514,7 +10528,7 @@ Change @return types and type from static analysis to type declarations if not a ## General -- [Core](#core) (42) +- [Core](#core) (44) ## Core @@ -11362,6 +11376,53 @@ services:
+### `RemoveFuncCallArgRector` + +- class: [`Rector\Core\Rector\FuncCall\RemoveFuncCallArgRector`](/../master/src/Rector/FuncCall/RemoveFuncCallArgRector.php) +- [test fixtures](/../master/tests/Rector/FuncCall/RemoveFuncCallArgRector/Fixture) + +Remove argument by position by function name + +```yaml +services: + Rector\Core\Rector\FuncCall\RemoveFuncCallArgRector: + $argumentPositionByFunctionName: + remove_last_arg: + - 1 +``` + +↓ + +```diff +-remove_last_arg(1, 2); ++remove_last_arg(1); +``` + +
+ +### `RemoveIniGetSetFuncCallRector` + +- class: [`Rector\Core\Rector\FuncCall\RemoveIniGetSetFuncCallRector`](/../master/src/Rector/FuncCall/RemoveIniGetSetFuncCallRector.php) +- [test fixtures](/../master/tests/Rector/FuncCall/RemoveIniGetSetFuncCallRector/Fixture) + +Remove ini_get by configuration + +```yaml +services: + Rector\Core\Rector\FuncCall\RemoveIniGetSetFuncCallRector: + $keysToRemove: + - y2k_compliance +``` + +↓ + +```diff +-ini_get('y2k_compliance'); +-ini_set('y2k_compliance', 1); +``` + +
+ ### `RemoveInterfacesRector` - class: [`Rector\Core\Rector\Interface_\RemoveInterfacesRector`](/../master/src/Rector/Interface_/RemoveInterfacesRector.php)