Skip to content

Commit

Permalink
[ci-review] Rector Rectify
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user authored and helsner committed Dec 22, 2023
1 parent 3d7c016 commit c121a8f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,34 +53,34 @@ public function change(string $condition): ?string
}

switch ($type) {
case 'TSFE' :
case 'TSFE':
$conditions[$key][] = $this->refactorTsfe($property, $operator, $value);
break;
case 'GP' :
case 'GP':
$conditions[$key][] = $this->refactorGetPost($property, $operator, $value);
break;
case 'LIT' :
case 'LIT':
$conditions[$key][] = sprintf('"%s" %s "%s"', $value, self::OPERATOR_MAPPING[$operator], $property);
break;
case 'ENV' :
case 'ENV':
$conditions[$key][] = $this->createEnvCondition($property, $operator, $value);
break;
case 'IENV' :
case 'IENV':
$conditions[$key][] = $this->createIndependentCondition($property, $operator, $value);
break;
case 'BE_USER' :
case 'BE_USER':
$conditions[$key][] = $this->createBackendUserCondition($property, $operator, $value);
break;
case '_GET' :
case '_GET':
$conditions[$key][] = $this->refactorGet($property, $operator, $value);
break;
case 'GPmerged' :
case 'GPmerged':
$conditions[$key][] = $this->refactorGetPost($property, $operator, $value);
break;
case '_POST' :
case '_POST':
$conditions[$key][] = $this->refactorPost($property, $operator, $value);
break;
default :
default:
$conditions[$key][] = $condition;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function refactor(Node $node): ?Node
$explodeFuncCall = $this->nodeFactory->createFuncCall('explode', [',', $node->args[1]]);

$itemVariable = new Variable('item');
$elementVariable = new Variable($this->nodeNameResolver->getName($node->args[0]->value));
$elementVariable = new Variable($this->nodeNameResolver->getName($node->args[0]->value) ?? 'element');

$stmts = [new Return_(new Equal($elementVariable, $itemVariable))];

Expand Down

0 comments on commit c121a8f

Please sign in to comment.