-
-
Notifications
You must be signed in to change notification settings - Fork 687
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Rector to commit 6dee862408c55479969b4bc0ba28a1d50d5d2e44
rectorphp/rector-src@6dee862 [DeadCode] Skip union docblock param with is_object() native type check on RemoveAlwaysTrueIfConditionRector (#6370)
- Loading branch information
1 parent
ab28bdf
commit c8ccd48
Showing
11 changed files
with
68 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
vendor/rector/rector-phpunit/rules/PHPUnit100/NodeDecorator/WillReturnIfNodeDecorator.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare (strict_types=1); | ||
namespace Rector\PHPUnit\PHPUnit100\NodeDecorator; | ||
|
||
use PhpParser\Node\Expr\Closure; | ||
use PhpParser\Node\Expr\MethodCall; | ||
use PhpParser\Node\Stmt\If_; | ||
use PhpParser\Node\Stmt\Return_; | ||
final class WillReturnIfNodeDecorator | ||
{ | ||
public function decorate(Closure $callbackClosure, ?MethodCall $willReturnOnConsecutiveMethodCall) : void | ||
{ | ||
if (!$willReturnOnConsecutiveMethodCall instanceof MethodCall) { | ||
return; | ||
} | ||
foreach ($callbackClosure->stmts as $key => $stmt) { | ||
if (!$stmt instanceof If_) { | ||
continue; | ||
} | ||
$currentArg = $willReturnOnConsecutiveMethodCall->getArgs()[$key]; | ||
$stmt->stmts[] = new Return_($currentArg->value); | ||
} | ||
} | ||
} |
23 changes: 0 additions & 23 deletions
23
vendor/rector/rector-phpunit/rules/PHPUnit100/NodeDecorator/WillReturnPerIfNodeDecorator.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters