diff --git a/src/FileProcessor/TypoScript/Conditions/GlobalVarConditionMatcher.php b/src/FileProcessor/TypoScript/Conditions/GlobalVarConditionMatcher.php index ef9130cbe..03f0831c2 100644 --- a/src/FileProcessor/TypoScript/Conditions/GlobalVarConditionMatcher.php +++ b/src/FileProcessor/TypoScript/Conditions/GlobalVarConditionMatcher.php @@ -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; } diff --git a/src/Rector/v11/v3/SubstituteMethodRmFromListOfGeneralUtilityRector.php b/src/Rector/v11/v3/SubstituteMethodRmFromListOfGeneralUtilityRector.php index 8c53d8b3e..c2994efb2 100644 --- a/src/Rector/v11/v3/SubstituteMethodRmFromListOfGeneralUtilityRector.php +++ b/src/Rector/v11/v3/SubstituteMethodRmFromListOfGeneralUtilityRector.php @@ -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))];