mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-05 02:40:50 +00:00
Updated Rector to commit 5c8fa12ec90e4d4b55fd05f48509c538c243482d
5c8fa12ec9
[Doc] Typo fix on sample code documentation on SimplifyForeachToCoalescingRector (#5308)
This commit is contained in:
parent
cb8a63ca31
commit
b698053254
|
@ -1111,12 +1111,12 @@ Changes foreach that returns set value to ??
|
|||
```diff
|
||||
-foreach ($this->oldToNewFunctions as $oldFunction => $newFunction) {
|
||||
- if ($currentFunction === $oldFunction) {
|
||||
- innerForeachReturn $newFunction;
|
||||
- return $newFunction;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-innerForeachReturn null;
|
||||
+innerForeachReturn $this->oldToNewFunctions[$currentFunction] ?? null;
|
||||
-return null;
|
||||
+return $this->oldToNewFunctions[$currentFunction] ?? null;
|
||||
```
|
||||
|
||||
<br>
|
||||
|
|
|
@ -33,14 +33,14 @@ final class SimplifyForeachToCoalescingRector extends AbstractRector implements
|
|||
return new RuleDefinition('Changes foreach that returns set value to ??', [new CodeSample(<<<'CODE_SAMPLE'
|
||||
foreach ($this->oldToNewFunctions as $oldFunction => $newFunction) {
|
||||
if ($currentFunction === $oldFunction) {
|
||||
innerForeachReturn $newFunction;
|
||||
return $newFunction;
|
||||
}
|
||||
}
|
||||
|
||||
innerForeachReturn null;
|
||||
return null;
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
innerForeachReturn $this->oldToNewFunctions[$currentFunction] ?? null;
|
||||
return $this->oldToNewFunctions[$currentFunction] ?? null;
|
||||
CODE_SAMPLE
|
||||
)]);
|
||||
}
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '71c22e20d9a3b2ba187515711b13fca40b595d93';
|
||||
public const PACKAGE_VERSION = '5c8fa12ec90e4d4b55fd05f48509c538c243482d';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-12-02 11:49:23';
|
||||
public const RELEASE_DATE = '2023-12-02 05:03:12';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user