mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-30 16:00:52 +00:00
[automated] Re-Generate Nodes/Rectors Documentation (#4759)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
This commit is contained in:
parent
4bf25404e1
commit
1dc13433a5
|
@ -1,4 +1,4 @@
|
|||
# 627 Rules Overview
|
||||
# 628 Rules Overview
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
- [DowngradePhp73](#downgradephp73) (2)
|
||||
|
||||
- [DowngradePhp74](#downgradephp74) (7)
|
||||
- [DowngradePhp74](#downgradephp74) (8)
|
||||
|
||||
- [DowngradePhp80](#downgradephp80) (6)
|
||||
|
||||
|
@ -5289,6 +5289,35 @@ Replace array spread with `array_merge` function
|
|||
|
||||
<br>
|
||||
|
||||
### DowngradeCovarianReturnTypeRector
|
||||
|
||||
Make method return same type as parent
|
||||
|
||||
- class: `Rector\DowngradePhp74\Rector\ClassMethod\DowngradeCovarianReturnTypeRector`
|
||||
|
||||
```diff
|
||||
class ParentType {}
|
||||
class ChildType extends ParentType {}
|
||||
|
||||
class A
|
||||
{
|
||||
public function covariantReturnTypes(): ParentType
|
||||
{ /* … */ }
|
||||
}
|
||||
|
||||
class B extends A
|
||||
{
|
||||
- public function covariantReturnTypes(): ChildType
|
||||
+ /**
|
||||
+ * @return ChildType
|
||||
+ */
|
||||
+ public function covariantReturnTypes(): ParentType
|
||||
{ /* … */ }
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### DowngradeNullCoalescingOperatorRector
|
||||
|
||||
Remove null coalescing operator ??=
|
||||
|
|
Loading…
Reference in New Issue
Block a user