Commit e576e861 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] CGL fix core after php-cs-fixer raise

We recently raised php-cs-fixer to a new minor
and missed running the fixer on all files which
leads to a red nightly.

> Build/Scripts/runTests.sh -s cgl

Resolves: #98066
Related: #98062
Releases: main
Change-Id: I26f873df9f1d40ed35480df79b4bf6a92cdbb213
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75345

Tested-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Nikita Hovratov's avatarNikita Hovratov <nikita.h@live.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent a6dc93ef
......@@ -120,7 +120,7 @@ class ConfigurationService implements SingletonInterface
($module instanceof ConfigurableInterface && $module->isEnabled())
|| !($module instanceof ConfigurableInterface)
)
) {
) {
$module->onSubmit($configurationToSave, $request);
}
if ($module instanceof SubmoduleProviderInterface) {
......
......@@ -158,7 +158,7 @@ class MoveElementController
// Create the position tree (for pages) without insert lines:
$pagePositionMap->dontPrintPageInsertIcons = 1;
$assigns['positionTree'] = $pagePositionMap->positionTree($this->page_id, $pageInfo, $this->perms_clause, $this->R_URI);
}
}
}
return $assigns;
}
......
......@@ -127,7 +127,7 @@ class FormFlexAjaxController extends AbstractFormEngineAjaxController
['data'][$flexFormSheetName]
['lDEF'][$flexFormFieldName]
['el'][$flexFormContainerIdentifier][$flexFormContainerName]['el']
)
)
&& is_array(
$formData['databaseRow'][$fieldName]
['data'][$flexFormSheetName]
......
......@@ -413,7 +413,7 @@ class NewRecordController
'items' => $newPageLinks,
];
}
break;
break;
case 'tt_content':
if (!$this->newContentInto || !$this->isRecordCreationAllowedForTable($table) || !$this->isTableAllowedOnPage($table, $this->pageinfo)) {
break;
......
......@@ -292,8 +292,8 @@ abstract class AbstractFormElement extends AbstractNode
}
break;
default:
// Do nothing e.g. when $format === ''
}
// Do nothing e.g. when $format === ''
}
return $itemValue;
}
......
......@@ -52,7 +52,7 @@ class DatabaseRowDateTimeFields implements FormDataProviderInterface
}
}
// its a UNIX timestamp! We do not modify this here, as it will only be treated as a datetime because
// of eval being set to "date" or "datetime". This is handled in InputTextElement then.
// of eval being set to "date" or "datetime". This is handled in InputTextElement then.
}
return $result;
}
......
......@@ -194,7 +194,7 @@ class TcaRecordTitle implements FormDataProviderInterface
// @todo: Check if and how a label could be generated from flex field data
default:
}
}
return $recordTitle;
}
......
......@@ -352,7 +352,7 @@ class PageTreeRepository
->select(...$this->fields)
->from('pages')
->where(
// Only show records in default language
// Only show records in default language
$queryBuilder->expr()->eq('sys_language_uid', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT))
);
......
......@@ -630,8 +630,8 @@ class PageLayoutView implements LoggerAwareInterface
$languageMode = $this->getLanguageService()->getLL('languageModeFree');
break;
default:
// we'll let opcode optimize this intentionally empty case
}
// we'll let opcode optimize this intentionally empty case
}
}
$columnAttributes = [
'valign' => 'top',
......
......@@ -44,18 +44,18 @@ class LanguageAspectFactory
$overlayType = LanguageAspect::OVERLAYS_OFF;
break;
// Fall back to other language, if the page does not exist in the requested language
// Do overlays, and keep the ones that are not translated
// Fall back to other language, if the page does not exist in the requested language
// Do overlays, and keep the ones that are not translated
case 'fallback':
$overlayType = LanguageAspect::OVERLAYS_MIXED;
break;
// Same as "fallback" but remove the records that are not translated
// Same as "fallback" but remove the records that are not translated
case 'strict':
$overlayType = LanguageAspect::OVERLAYS_ON_WITH_FLOATING;
break;
// Ignore, fallback to default language
// Ignore, fallback to default language
default:
$fallbackOrder = [0];
$overlayType = LanguageAspect::OVERLAYS_OFF;
......
......@@ -2711,7 +2711,7 @@ class DataHandler implements LoggerAwareInterface
$queryBuilder
->andWhere(
$queryBuilder->expr()->or(
// records without l10n_parent must be taken into account (in any language)
// records without l10n_parent must be taken into account (in any language)
$queryBuilder->expr()->eq(
$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'],
$queryBuilder->createPositionalParameter(0, \PDO::PARAM_INT)
......
......@@ -879,7 +879,7 @@ class ReferenceIndex implements LoggerAwareInterface
|| $configuration['type'] === 'email'
|| $configuration['type'] === 'flex'
|| isset($configuration['softref'])
;
;
}
/**
......
......@@ -270,10 +270,10 @@ class Lexer extends AbstractLexer
return self::T_OPEN_CURLY_BRACE;
case '}':
return self::T_CLOSE_CURLY_BRACE;
// Default
// Default
default:
// Do nothing
}
// Do nothing
}
return $type;
}
......
......@@ -282,8 +282,8 @@ class Parser
--$numUnmatched;
break;
default:
// Do nothing
}
// Do nothing
}
$token = $this->lexer->peek();
}
......
......@@ -1690,7 +1690,7 @@ class PageRepository implements LoggerAwareInterface
$queryBuilder->createNamedParameter($workspace, \PDO::PARAM_INT)
),
$queryBuilder->expr()->or(
// t3ver_state=1 does not contain a t3ver_oid, and returns itself
// t3ver_state=1 does not contain a t3ver_oid, and returns itself
$queryBuilder->expr()->and(
$queryBuilder->expr()->eq(
'uid',
......@@ -1728,7 +1728,7 @@ class PageRepository implements LoggerAwareInterface
$queryBuilder->createNamedParameter($workspace, \PDO::PARAM_INT)
),
$queryBuilder->expr()->or(
// t3ver_state=1 does not contain a t3ver_oid, and returns itself
// t3ver_state=1 does not contain a t3ver_oid, and returns itself
$queryBuilder->expr()->and(
$queryBuilder->expr()->eq(
'uid',
......
......@@ -186,8 +186,8 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
$value = $this->TS_transform_rte($value);
break;
default:
// Do nothing
}
// Do nothing
}
}
// If an exit HTML cleaner was configured, pass the content through the HTMLcleaner
$value = $this->runHtmlParserIfConfigured($value, 'exitHTMLparser_rte');
......@@ -227,8 +227,8 @@ class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
$value = $this->TS_transform_db($value);
break;
default:
// Do nothing
}
// Do nothing
}
}
// process markup with HTML Sanitizer
$value = $this->htmlSanitize($value, $this->procOptions['HTMLparser_db.'] ?? []);
......
......@@ -160,7 +160,7 @@ class TransportFactory implements SingletonInterface, LoggerAwareInterface
$this->logManager->getLogger(MboxTransport::class)
);
break;
// Used for testing purposes
// Used for testing purposes
case 'null':
case NullTransport::class:
$transport = new NullTransport(
......@@ -168,7 +168,7 @@ class TransportFactory implements SingletonInterface, LoggerAwareInterface
$this->logManager->getLogger(NullTransport::class)
);
break;
// Used by Symfony's Transport Factory
// Used by Symfony's Transport Factory
case !empty($mailSettings['dsn']):
case 'dsn':
if (empty($mailSettings['dsn'])) {
......
......@@ -153,15 +153,15 @@ class JavaScriptRenderer
{
foreach ($state as $var => $value) {
switch ($var) {
case 'items':
$this->items->updateState($value);
break;
case 'importMap':
$this->importMap->updateState($value);
break;
default:
$this->{$var} = $value;
break;
case 'items':
$this->items->updateState($value);
break;
case 'importMap':
$this->importMap->updateState($value);
break;
default:
$this->{$var} = $value;
break;
}
}
}
......@@ -174,15 +174,15 @@ class JavaScriptRenderer
$state = [];
foreach (get_object_vars($this) as $var => $value) {
switch ($var) {
case 'items':
$state[$var] = $this->items->getState();
break;
case 'importMap':
$state[$var] = $this->importMap->getState();
break;
default:
$state[$var] = $value;
break;
case 'items':
$state[$var] = $this->items->getState();
break;
case 'importMap':
$state[$var] = $this->importMap->getState();
break;
default:
$state[$var] = $value;
break;
}
}
return $state;
......
......@@ -351,26 +351,26 @@ class PageRenderer implements SingletonInterface
{
foreach ($state as $var => $value) {
switch ($var) {
case 'assetsCache':
case 'locales':
case 'packageManager':
case 'assetRenderer':
case 'templateService':
case 'resourceCompressor':
case 'relativeCssPathFixer':
case 'localizationFactory':
case 'responseFactory':
case 'streamFactory':
break;
case 'metaTagRegistry':
$this->metaTagRegistry->updateState($value);
break;
case 'javaScriptRenderer':
$this->javaScriptRenderer->updateState($value);
break;
default:
$this->{$var} = $value;
break;
case 'assetsCache':
case 'locales':
case 'packageManager':
case 'assetRenderer':
case 'templateService':
case 'resourceCompressor':
case 'relativeCssPathFixer':
case 'localizationFactory':
case 'responseFactory':
case 'streamFactory':
break;
case 'metaTagRegistry':
$this->metaTagRegistry->updateState($value);
break;
case 'javaScriptRenderer':
$this->javaScriptRenderer->updateState($value);
break;
default:
$this->{$var} = $value;
break;
}
}
}
......@@ -384,26 +384,26 @@ class PageRenderer implements SingletonInterface
$state = [];
foreach (get_object_vars($this) as $var => $value) {
switch ($var) {
case 'assetsCache':
case 'locales':
case 'packageManager':
case 'assetRenderer':
case 'templateService':
case 'resourceCompressor':
case 'relativeCssPathFixer':
case 'localizationFactory':
case 'responseFactory':
case 'streamFactory':
break;
case 'metaTagRegistry':
$state[$var] = $this->metaTagRegistry->getState();
break;
case 'javaScriptRenderer':
$state[$var] = $this->javaScriptRenderer->getState();
break;
default:
$state[$var] = $value;
break;
case 'assetsCache':
case 'locales':
case 'packageManager':
case 'assetRenderer':
case 'templateService':
case 'resourceCompressor':
case 'relativeCssPathFixer':
case 'localizationFactory':
case 'responseFactory':
case 'streamFactory':
break;
case 'metaTagRegistry':
$state[$var] = $this->metaTagRegistry->getState();
break;
case 'javaScriptRenderer':
$state[$var] = $this->javaScriptRenderer->getState();
break;
default:
$state[$var] = $value;
break;
}
}
return $state;
......
......@@ -388,12 +388,12 @@ class LocalDriver extends AbstractHierarchicalFilesystemDriver implements Stream
try {
if (
!$this->applyFilterMethodsToDirectoryItem(
$filterMethods,
$iteratorItem['name'],
$iteratorItem['identifier'],
$this->getParentFolderIdentifierOfIdentifier($iteratorItem['identifier'])
)
!$this->applyFilterMethodsToDirectoryItem(
$filterMethods,
$iteratorItem['name'],
$iteratorItem['identifier'],
$this->getParentFolderIdentifierOfIdentifier($iteratorItem['identifier'])
)
) {
continue;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment