mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-31 00:10:51 +00:00
[automated] Re-Generate Nodes/Rectors Documentation (#5539)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
This commit is contained in:
parent
35f7aeee61
commit
981e437bb7
|
@ -1,4 +1,4 @@
|
|||
# 669 Rules Overview
|
||||
# 668 Rules Overview
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
|||
|
||||
- [EarlyReturn](#earlyreturn) (8)
|
||||
|
||||
- [Generic](#generic) (12)
|
||||
- [Generic](#generic) (11)
|
||||
|
||||
- [Generics](#generics) (1)
|
||||
|
||||
|
@ -2458,7 +2458,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
|||
|
||||
### SplitDoubleAssignRector
|
||||
|
||||
Split multiple inline assigns to each own lines default value, to prevent undefined array issues
|
||||
Split multiple inline assigns to `each` own lines default value, to prevent undefined array issues
|
||||
|
||||
- class: `Rector\CodingStyle\Rector\Assign\SplitDoubleAssignRector`
|
||||
|
||||
|
@ -6808,49 +6808,6 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
|||
|
||||
<br>
|
||||
|
||||
### AddPropertyByParentRector
|
||||
|
||||
Add dependency via constructor by parent class type
|
||||
|
||||
:wrench: **configure it!**
|
||||
|
||||
- class: `Rector\Generic\Rector\Class_\AddPropertyByParentRector`
|
||||
|
||||
```php
|
||||
use Rector\Generic\Rector\Class_\AddPropertyByParentRector;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services = $containerConfigurator->services();
|
||||
|
||||
$services->set(AddPropertyByParentRector::class)
|
||||
->call('configure', [[
|
||||
AddPropertyByParentRector::PARENT_DEPENDENCIES => [
|
||||
'SomeParentClass' => ['SomeDependency'],
|
||||
],
|
||||
]]);
|
||||
};
|
||||
```
|
||||
|
||||
↓
|
||||
|
||||
```diff
|
||||
final class SomeClass extends SomeParentClass
|
||||
{
|
||||
+ /**
|
||||
+ * @var SomeDependency
|
||||
+ */
|
||||
+ private $someDependency;
|
||||
+
|
||||
+ public function __construct(SomeDependency $someDependency)
|
||||
+ {
|
||||
+ $this->someDependency = $someDependency;
|
||||
+ }
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### AnnotatedPropertyInjectToConstructorInjectionRector
|
||||
|
||||
Turns non-private properties with `@inject` to private properties and constructor injection
|
||||
|
@ -13368,7 +13325,7 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
|||
|
||||
### PassFactoryToUniqueObjectRector
|
||||
|
||||
Convert new `X/Static::call()` to factories in entities, pass them via constructor to each other
|
||||
Convert new `X/Static::call()` to factories in entities, pass them via constructor to `each` other
|
||||
|
||||
:wrench: **configure it!**
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user