Skip to content

Commit 162b5bb

Browse files
committed
Updated Rector to commit 6c17f02d41f2e0628d1962a54198539446552e5f
rectorphp/rector-src@6c17f02 [CodeQuality] Handle constant definition in InlineIfToExplicitIfRector (#9078)
1 parent c6ed32b commit 162b5bb

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

‎rules/CodeQuality/Rector/Expression/InlineIfToExplicitIfRector.php‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
use PhpParser\Node\Expr;
88
use PhpParser\Node\Expr\BinaryOp\BooleanAnd;
99
use PhpParser\Node\Expr\BinaryOp\BooleanOr;
10-
use PhpParser\Node\Expr\BooleanNot;
11-
use PhpParser\Node\Expr\FuncCall;
1210
use PhpParser\Node\Expr\MethodCall;
1311
use PhpParser\Node\Expr\Variable;
1412
use PhpParser\Node\Stmt\Expression;
@@ -82,18 +80,13 @@ private function processExplicitIf(Expression $expression): ?Node
8280
{
8381
/** @var BooleanAnd|BooleanOr $booleanExpr */
8482
$booleanExpr = $expression->expr;
85-
$exprLeft = $booleanExpr->left instanceof BooleanNot ? $booleanExpr->left->expr : $booleanExpr->left;
86-
if ($exprLeft instanceof FuncCall && $this->isName($exprLeft, 'defined')) {
87-
return null;
88-
}
8983
if ($this->isSameLocalMethodCallChain($booleanExpr)) {
9084
return null;
9185
}
9286
$leftStaticType = $this->getType($booleanExpr->left);
9387
if (!$leftStaticType->isBoolean()->yes()) {
9488
return null;
9589
}
96-
/** @var Expr $expr */
9790
$expr = $booleanExpr instanceof BooleanAnd ? $booleanExpr->left : $this->binaryOpManipulator->inverseNode($booleanExpr->left);
9891
$if = new If_($expr);
9992
$if->stmts[] = new Expression($booleanExpr->right);

‎src/Application/VersionResolver.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ final class VersionResolver
1919
* @api
2020
* @var string
2121
*/
22-
public const PACKAGE_VERSION = '838b1ad5c13485908c17f2c525667f906ccc0956';
22+
public const PACKAGE_VERSION = '6c17f02d41f2e0628d1962a54198539446552e5f';
2323
/**
2424
* @api
2525
* @var string
2626
*/
27-
public const RELEASE_DATE = '2026-11-26 16:59:30';
27+
public const RELEASE_DATE = '2026-11-27 12:07:29';
2828
/**
2929
* @var int
3030
*/

0 commit comments

Comments
 (0)