From 9f5ce28c111a9965e45a7d215cd08595045df3f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Chris=20M=C3=BCller?=
<2566282+brotkrueml@users.noreply.github.com>
Date: Tue, 5 Mar 2024 08:50:34 +0000
Subject: [PATCH] [TASK] Set more options for php-cs-fixer's trailing comma in
multiline rule (#235)
Releases: main
---
.php-cs-fixer.dist.php | 2 +-
Classes/Command/CreateWizardCommand.php | 10 +--
Classes/Command/MeowInformationCommand.php | 2 +-
Classes/Controller/AdminModuleController.php | 22 ++---
Classes/Controller/FalExampleController.php | 4 +-
Classes/Controller/Haiku/DetailController.php | 6 +-
Classes/Controller/Haiku/ListController.php | 2 +-
Classes/Controller/HtmlParserController.php | 8 +-
Classes/Controller/ModuleController.php | 82 +++++++++----------
.../CustomCategoryProcessor.php | 2 +-
Classes/Domain/Repository/HaikuRepository.php | 6 +-
...ExternalLinksToLocalPagesEventListener.php | 6 +-
Classes/Http/MeowInformationRequester.php | 6 +-
Classes/LinkHandler/GithubLinkBuilder.php | 4 +-
.../LinkType/ExampleLinkType.php | 2 +-
Classes/Middleware/HaikuSeasonList.php | 4 +-
Classes/Reaction/ExampleReactionType.php | 2 +-
Configuration/TCA/Overrides/be_users.php | 2 +-
Configuration/TCA/Overrides/fe_users.php | 2 +-
Configuration/TCA/Overrides/pages.php | 2 +-
Configuration/TCA/Overrides/sys_reaction.php | 2 +-
Configuration/TCA/Overrides/sys_template.php | 4 +-
Configuration/TCA/Overrides/tt_content.php | 22 ++---
.../tt_content_plugin_haiku_detail.php | 4 +-
.../tt_content_plugin_haiku_list.php | 4 +-
.../tt_content_plugin_htmlparser.php | 4 +-
.../TCA/Overrides/tt_content_plugin_pi1.php | 4 +-
ext_localconf.php | 6 +-
ext_tables.php | 4 +-
29 files changed, 115 insertions(+), 115 deletions(-)
diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php
index 26de476..677335c 100644
--- a/.php-cs-fixer.dist.php
+++ b/.php-cs-fixer.dist.php
@@ -80,7 +80,7 @@
'single_line_comment_style' => ['comment_types' => ['hash']],
// @todo: Can be dropped once we enable @PER-CS2.0
'single_line_empty_body' => true,
- 'trailing_comma_in_multiline' => ['elements' => ['arrays']],
+ 'trailing_comma_in_multiline' => ['elements' => ['arguments', 'arrays', 'match', 'parameters']],
'whitespace_after_comma_in_array' => ['ensure_single_space' => true],
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
diff --git a/Classes/Command/CreateWizardCommand.php b/Classes/Command/CreateWizardCommand.php
index d3d313e..4c9c3eb 100644
--- a/Classes/Command/CreateWizardCommand.php
+++ b/Classes/Command/CreateWizardCommand.php
@@ -34,19 +34,19 @@ protected function configure(): void
->addArgument(
'wizardName',
InputArgument::OPTIONAL,
- 'The wizard\'s name'
+ 'The wizard\'s name',
)
->addOption(
'brute-force',
'b',
InputOption::VALUE_NONE,
- 'Allow the "Wizard of Oz". You can use --brute-force or -b when running command'
+ 'Allow the "Wizard of Oz". You can use --brute-force or -b when running command',
);
}
protected function execute(
InputInterface $input,
- OutputInterface $output
+ OutputInterface $output,
): int {
$io = new SymfonyStyle($input, $output);
$wizardName = $input->getArgument('wizardName');
@@ -62,13 +62,13 @@ protected function execute(
private function doMagic(
SymfonyStyle $io,
mixed $wizardName,
- bool $bruteForce
+ bool $bruteForce,
) {
$io->comment('Trying to create wizard ' . $wizardName . '...');
if ($wizardName === null) {
$wizardName = (string)$io->ask(
'Enter the wizard\'s name (e.g. "Gandalf the Grey")',
- 'Lord Voldermort'
+ 'Lord Voldermort',
);
}
if (!$bruteForce && $wizardName === 'Oz') {
diff --git a/Classes/Command/MeowInformationCommand.php b/Classes/Command/MeowInformationCommand.php
index 650d2eb..cba0d71 100644
--- a/Classes/Command/MeowInformationCommand.php
+++ b/Classes/Command/MeowInformationCommand.php
@@ -40,7 +40,7 @@ protected function configure()
protected function execute(
InputInterface $input,
- OutputInterface $output
+ OutputInterface $output,
): int {
$io = new SymfonyStyle($input, $output);
$io->title($this->getDescription());
diff --git a/Classes/Controller/AdminModuleController.php b/Classes/Controller/AdminModuleController.php
index d6d7947..a43aa0b 100644
--- a/Classes/Controller/AdminModuleController.php
+++ b/Classes/Controller/AdminModuleController.php
@@ -42,13 +42,13 @@ public function handleRequest(ServerRequestInterface $request): ResponseInterfac
$allowedOptions = [
'function' => [
'debug' => htmlspecialchars(
- $languageService->sL('EXT:examples/Resources/Private/Language/AdminModule/locallang.xlf:debug')
+ $languageService->sL('EXT:examples/Resources/Private/Language/AdminModule/locallang.xlf:debug'),
),
'password' => htmlspecialchars(
- $languageService->sL('EXT:examples/Resources/Private/Language/AdminModule/locallang.xlf:password')
+ $languageService->sL('EXT:examples/Resources/Private/Language/AdminModule/locallang.xlf:password'),
),
'index' => htmlspecialchars(
- $languageService->sL('EXT:examples/Resources/Private/Language/AdminModule/locallang.xlf:index')
+ $languageService->sL('EXT:examples/Resources/Private/Language/AdminModule/locallang.xlf:index'),
),
],
];
@@ -66,19 +66,19 @@ public function handleRequest(ServerRequestInterface $request): ResponseInterfac
case 'debug':
$moduleTemplate->setTitle(
$title,
- $languageService->sL('EXT:examples/Resources/Private/Language/AdminModule/locallang.xlf:module.menu.debug')
+ $languageService->sL('EXT:examples/Resources/Private/Language/AdminModule/locallang.xlf:module.menu.debug'),
);
return $this->debugAction($request, $moduleTemplate);
case 'password':
$moduleTemplate->setTitle(
$title,
- $languageService->sL('EXT:examples/Resources/Private/Language/AdminModule/locallang.xlf:module.menu.password')
+ $languageService->sL('EXT:examples/Resources/Private/Language/AdminModule/locallang.xlf:module.menu.password'),
);
return $this->passwordAction($request, $moduleTemplate);
default:
$moduleTemplate->setTitle(
$title,
- $languageService->sL('EXT:examples/Resources/Private/Language/AdminModule/locallang.xlf:module.menu.log')
+ $languageService->sL('EXT:examples/Resources/Private/Language/AdminModule/locallang.xlf:module.menu.log'),
);
return $this->indexAction($request, $moduleTemplate);
}
@@ -86,7 +86,7 @@ public function handleRequest(ServerRequestInterface $request): ResponseInterfac
private function setUpDocHeader(
ServerRequestInterface $request,
- ModuleTemplate $view
+ ModuleTemplate $view,
) {
$buttonBar = $view->getDocHeaderComponent()->getButtonBar();
$list = $buttonBar->makeLinkButton()
@@ -99,7 +99,7 @@ private function setUpDocHeader(
public function indexAction(
ServerRequestInterface $request,
- ModuleTemplate $view
+ ModuleTemplate $view,
): ResponseInterface {
$view->assign('aVariable', 'aValue');
return $view->renderResponse('AdminModule/Index');
@@ -107,7 +107,7 @@ public function indexAction(
protected function debugAction(
ServerRequestInterface $request,
- ModuleTemplate $view
+ ModuleTemplate $view,
): ResponseInterface {
$cmd = $request->getParsedBody()['tx_examples_admin_examples']['cmd'] ?? 'cookies';
switch ($cmd) {
@@ -122,14 +122,14 @@ protected function debugAction(
[
'cookies' => $request->getCookieParams(),
'lastcommand' => $cmd,
- ]
+ ],
);
return $view->renderResponse('AdminModule/Debug');
}
protected function passwordAction(
ServerRequestInterface $request,
- ModuleTemplate $view
+ ModuleTemplate $view,
): ResponseInterface {
// TODO: Do something
return $view->renderResponse('AdminModule/Password');
diff --git a/Classes/Controller/FalExampleController.php b/Classes/Controller/FalExampleController.php
index 6e8267b..e174637 100644
--- a/Classes/Controller/FalExampleController.php
+++ b/Classes/Controller/FalExampleController.php
@@ -52,7 +52,7 @@ public function listFilesAction(): ResponseInterface
[
'folder' => $folder,
'files' => $files,
- ]
+ ],
);
}
return $this->htmlResponse();
@@ -70,7 +70,7 @@ public function collectionAction(): ResponseInterface
[
'collection' => $collection,
'files' => $collection->getItems(),
- ]
+ ],
);
}
return $this->htmlResponse();
diff --git a/Classes/Controller/Haiku/DetailController.php b/Classes/Controller/Haiku/DetailController.php
index f0f29ab..39496c6 100644
--- a/Classes/Controller/Haiku/DetailController.php
+++ b/Classes/Controller/Haiku/DetailController.php
@@ -80,8 +80,8 @@ private function notFoundAction(string $reason): never
null,
404,
[],
- $reason
- )
+ $reason,
+ ),
);
}
@@ -105,7 +105,7 @@ private function loadFlexFormSettings(): void
{
$this->conf['settings'] = $this->flexFormSettingsService->combineSettings(
$this->conf['settings'] ?? [],
- $this->cObj->data['pi_flexform'] ?? ''
+ $this->cObj->data['pi_flexform'] ?? '',
);
}
}
diff --git a/Classes/Controller/Haiku/ListController.php b/Classes/Controller/Haiku/ListController.php
index 8ee7bf7..6d82bef 100644
--- a/Classes/Controller/Haiku/ListController.php
+++ b/Classes/Controller/Haiku/ListController.php
@@ -59,7 +59,7 @@ private function loadFlexFormSettings(): void
{
$this->conf['settings'] = $this->flexFormSettingsService->combineSettings(
$this->conf['settings'] ?? [],
- $this->cObj->data['pi_flexform'] ?? ''
+ $this->cObj->data['pi_flexform'] ?? '',
);
}
}
diff --git a/Classes/Controller/HtmlParserController.php b/Classes/Controller/HtmlParserController.php
index e16df4f..703422b 100644
--- a/Classes/Controller/HtmlParserController.php
+++ b/Classes/Controller/HtmlParserController.php
@@ -63,13 +63,13 @@ public function indexAction(): ResponseInterface
// Splitting HTML into blocks defined by
and
block tags
$this->view->assign(
'result1',
- $this->htmlParser->splitIntoBlock('div,table', $testHTML)
+ $this->htmlParser->splitIntoBlock('div,table', $testHTML),
);
// Splitting HTML into blocks defined by
and
single tags
$this->view->assign(
'result2',
- $this->htmlParser->splitTags('img,br', $testHTML)
+ $this->htmlParser->splitTags('img,br', $testHTML),
);
// Cleaning HTML
@@ -97,8 +97,8 @@ public function indexAction(): ResponseInterface
$tagCfg,
false,
false,
- ['xhtml' => 1]
- )
+ ['xhtml' => 1],
+ ),
);
return $this->htmlResponse();
}
diff --git a/Classes/Controller/ModuleController.php b/Classes/Controller/ModuleController.php
index 9842aa7..f8da916 100644
--- a/Classes/Controller/ModuleController.php
+++ b/Classes/Controller/ModuleController.php
@@ -77,22 +77,22 @@ public function flashAction(): ResponseInterface
$this->addFlashMessage(
'This is a notice message',
'Notification',
- ContextualFeedbackSeverity::NOTICE
+ ContextualFeedbackSeverity::NOTICE,
);
$this->addFlashMessage(
'This is an information message',
'Information',
- ContextualFeedbackSeverity::INFO
+ ContextualFeedbackSeverity::INFO,
);
$this->addFlashMessage(
'This is a success message',
'Hooray!',
- ContextualFeedbackSeverity::OK
+ ContextualFeedbackSeverity::OK,
);
$this->addFlashMessage(
'This is a warning message',
'Watch out',
- ContextualFeedbackSeverity::WARNING
+ ContextualFeedbackSeverity::WARNING,
);
$this->addFlashMessage(
'
@@ -100,13 +100,13 @@ public function flashAction(): ResponseInterface
It shows that flash messages may not contain HTML (anymore, since TYPO3 7 LTS).
',
'Whoops!',
- ContextualFeedbackSeverity::ERROR
+ ContextualFeedbackSeverity::ERROR,
);
$this->addFlashMessage(
'This message is forced to be NOT stored in the session by setting the fourth argument to FALSE.',
'Success',
ContextualFeedbackSeverity::OK,
- false
+ false,
);
$this->addFlashMessage('This is a simple message, by default without title and with severity OK.');
$view = $this->initializeModuleTemplate($this->request);
@@ -126,16 +126,16 @@ public function logAction(): ResponseInterface
[
'foo' => 'bar',
'bar' => $this,
- ]
+ ],
);
$this->logger->log(
LogLevel::CRITICAL,
- 'This is an utter failure!'
+ 'This is an utter failure!',
);
$this->addFlashMessage(
'3 log entries created',
'',
- ContextualFeedbackSeverity::INFO
+ ContextualFeedbackSeverity::INFO,
);
$view = $this->initializeModuleTemplate($this->request);
return $view->renderResponse();
@@ -154,7 +154,7 @@ public function treeAction(): ResponseInterface
}
$pageRecord = BackendUtility::getRecord(
'pages',
- $startingPoint
+ $startingPoint,
);
// Create and initialize the tree object
@@ -166,7 +166,7 @@ public function treeAction(): ResponseInterface
$html = $this->iconFactory->getIconForRecord(
'pages',
$pageRecord,
- Icon::SIZE_SMALL
+ Icon::SIZE_SMALL,
)->render();
}
$tree->tree[] = [
@@ -179,7 +179,7 @@ public function treeAction(): ResponseInterface
$tree->getTree(
$startingPoint,
$depth,
- ''
+ '',
);
$view = $this->initializeModuleTemplate($this->request);
@@ -187,7 +187,7 @@ public function treeAction(): ResponseInterface
// Pass the tree to the view
$view->assign(
'tree',
- $tree->tree
+ $tree->tree,
);
return $view->renderResponse();
}
@@ -196,7 +196,7 @@ public function treeAction(): ResponseInterface
* Displays the content of the clipboard
*/
public function debugAction(
- string $cmd = 'cookies'
+ string $cmd = 'cookies',
): ResponseInterface {
$cmd = $_POST['tx_examples_tools_examplesexamples']['cmd'];
switch ($cmd) {
@@ -218,7 +218,7 @@ protected function debugCookies()
* Displays the content of the clipboard
*/
public function clipboardAction(
- string $cmd = 'show'
+ string $cmd = 'show',
): ResponseInterface {
$cmd = $_POST['tx_examples_tools_examplesexamples']['cmd'] ?? '';
switch ($cmd) {
@@ -237,7 +237,7 @@ public function clipboardAction(
[
'current' => $currentPad,
'normal' => $normalPad,
- ]
+ ],
);
$view = $this->initializeModuleTemplate($this->request);
return $view->renderResponse();
@@ -299,12 +299,12 @@ public function linksAction(): ResponseInterface
$uriParameters = ['edit' => ['pages' => [1 => 'edit']]];
$editPage1Link = $backendUriBuilder->buildUriFromRoute(
'record_edit',
- $uriParameters
+ $uriParameters,
);
$pageUid = (int)($this->request->getQueryParams()['id'] ?? 0);
$returnUrl = (string)$backendUriBuilder->buildUriFromRoute(
'web_examples',
- ['id' => $pageUid, 'action' => 'links']
+ ['id' => $pageUid, 'action' => 'links'],
);
$uriParameters =
@@ -326,7 +326,7 @@ public function linksAction(): ResponseInterface
];
$editPagesDoktypeLink = $backendUriBuilder->buildUriFromRoute(
'record_edit',
- $uriParameters
+ $uriParameters,
);
$uriParameters =
[
@@ -349,7 +349,7 @@ public function linksAction(): ResponseInterface
];
$createHaikuLink = $backendUriBuilder->buildUriFromRoute(
'record_edit',
- $uriParameters
+ $uriParameters,
);
$view = $this->initializeModuleTemplate($this->request);
@@ -358,7 +358,7 @@ public function linksAction(): ResponseInterface
'editPage1Link' => $editPage1Link,
'editPagesDoktypeLink' => $editPagesDoktypeLink,
'createHaikuLink' => $createHaikuLink,
- ]
+ ],
);
return $view->renderResponse();
}
@@ -380,7 +380,7 @@ public function fileReferenceAction($element = 0): ResponseInterface
'tt_content',
[],
[],
- ['header' => 'ASC']
+ ['header' => 'ASC'],
);
} catch (\Exception) {
$contentElements = [];
@@ -389,13 +389,13 @@ public function fileReferenceAction($element = 0): ResponseInterface
if ((int)$element > 0) {
$contentElement = BackendUtility::getRecord(
'tt_content',
- (int)$element
+ (int)$element,
);
try {
$fileObjects = $this->fileRepository->findByRelation(
'tt_content',
'image',
- $element
+ $element,
);
} catch (\Exception) {
$fileObjects = [];
@@ -411,7 +411,7 @@ public function fileReferenceAction($element = 0): ResponseInterface
'elements' => $contentElements,
'content' => $contentElement,
'references' => $fileObjects,
- ]
+ ],
);
return $view->renderResponse();
}
@@ -424,7 +424,7 @@ public function fileReferenceAction($element = 0): ResponseInterface
*/
public function fileReferenceCreateAction(
$file,
- $element
+ $element,
): ResponseInterface {
// Early return if either item is missing
if ((int)$file === 0 || (int)$element === 0) {
@@ -434,7 +434,7 @@ public function fileReferenceCreateAction(
$fileObject = $this->resourceFactory->getFileObject((int)$file);
$contentElement = BackendUtility::getRecord(
'tt_content',
- (int)$element
+ (int)$element,
);
// Assemble DataHandler data
$newId = 'NEW1234';
@@ -458,9 +458,9 @@ public function fileReferenceCreateAction(
$this->addFlashMessage(
LocalizationUtility::translate(
'create_relation_success',
- 'examples'
+ 'examples',
),
- ''
+ '',
);
} else {
foreach ($this->dataHandler->errorLog as $log) {
@@ -468,9 +468,9 @@ public function fileReferenceCreateAction(
$log,
LocalizationUtility::translate(
'create_relation_error',
- 'examples'
+ 'examples',
),
- ContextualFeedbackSeverity::ERROR
+ ContextualFeedbackSeverity::ERROR,
);
}
}
@@ -482,7 +482,7 @@ public function fileReferenceCreateAction(
null,
[
'element' => $contentElement['uid'],
- ]
+ ],
);
}
@@ -495,7 +495,7 @@ public function getPasswordHash(string $password, string $mode): string
public function checkPassword(
string $hashedPassword,
string $expectedPassword,
- string $mode
+ string $mode,
): bool {
$hashInstance = $this->passwordHashFactory->getDefaultHashInstance($mode);
return $hashInstance->checkPassword($expectedPassword, $hashedPassword);
@@ -508,7 +508,7 @@ public function passwordAction(
string $passwordAction = 'get',
string $password = 'joh316',
string $hashedPassword = '',
- string $mode = 'FE'
+ string $mode = 'FE',
): ResponseInterface {
$modes = ['FE' => 'FE', 'BE' => 'BE'];
if ($passwordAction == 'Check') {
@@ -526,7 +526,7 @@ public function passwordAction(
'password' => $password,
'success' => $success,
'passwordAction' => $passwordAction,
- ]
+ ],
);
return $view->renderResponse();
}
@@ -541,13 +541,13 @@ public function countAction(string $tablename = 'pages'): ResponseInterface
$message = LocalizationUtility::translate(
key: 'record_count_message',
extensionName: 'examples',
- arguments: [$count, $tablename]
+ arguments: [$count, $tablename],
);
$this->addFlashMessage(
messageBody: $message,
messageTitle: 'Information',
- severity: ContextualFeedbackSeverity::INFO
+ severity: ContextualFeedbackSeverity::INFO,
);
return $this->redirect('flash');
}
@@ -556,7 +556,7 @@ public function countAction(string $tablename = 'pages'): ResponseInterface
* Generates the action menu
*/
protected function initializeModuleTemplate(
- ServerRequestInterface $request
+ ServerRequestInterface $request,
): ModuleTemplate {
$menuItems = [
'flash' => [
@@ -598,7 +598,7 @@ protected function initializeModuleTemplate(
->setHref($this->uriBuilder->reset()->uriFor(
$menuItemConfig['action'],
[],
- $menuItemConfig['controller']
+ $menuItemConfig['controller'],
))
->setActive($isActive);
$menu->addMenuItem($menuItem);
@@ -611,13 +611,13 @@ protected function initializeModuleTemplate(
$view->setTitle(
$this->getLanguageService()->sL('LLL:EXT:examples/Resources/Private/Language/Module/locallang_mod.xlf:mlang_tabs_tab'),
- $context
+ $context,
);
$permissionClause = $this->getBackendUserAuthentication()->getPagePermsClause(Permission::PAGE_SHOW);
$pageRecord = BackendUtility::readPageAccess(
$this->pageUid,
- $permissionClause
+ $permissionClause,
);
if ($pageRecord) {
$view->getDocHeaderComponent()->setMetaInformation($pageRecord);
diff --git a/Classes/DataProcessing/CustomCategoryProcessor.php b/Classes/DataProcessing/CustomCategoryProcessor.php
index 4f059ed..cd305fc 100644
--- a/Classes/DataProcessing/CustomCategoryProcessor.php
+++ b/Classes/DataProcessing/CustomCategoryProcessor.php
@@ -40,7 +40,7 @@ public function process(
ContentObjectRenderer $cObj,
array $contentObjectConfiguration,
array $processorConfiguration,
- array $processedData
+ array $processedData,
) {
if (isset($processorConfiguration['if.']) && !$cObj->checkIf($processorConfiguration['if.'])) {
return $processedData;
diff --git a/Classes/Domain/Repository/HaikuRepository.php b/Classes/Domain/Repository/HaikuRepository.php
index 70560cd..31948a5 100644
--- a/Classes/Domain/Repository/HaikuRepository.php
+++ b/Classes/Domain/Repository/HaikuRepository.php
@@ -48,7 +48,7 @@ public function findByUid(int $uid): array
// $uid is an integer so we don't have to worry about SQL injections
$where = $queryBuilder->expr()->eq('uid', $uid);
$result = $queryBuilder->select('*')->from(self::TABLENAME)->where(
- $where
+ $where,
)->executeQuery()->fetchAssociative();
if (!$result) {
throw new NoSuchHaikuException('Haiku with uid ' . $uid . 'not found.', 1664390495);
@@ -66,10 +66,10 @@ public function findByTitle(string $title): array
// through createNamedParameter. This could cause SQL injections
$where = $queryBuilder->expr()->eq(
'title',
- $queryBuilder->createNamedParameter($title)
+ $queryBuilder->createNamedParameter($title),
);
$result = $queryBuilder->select('*')->from(self::TABLENAME)->where(
- $where
+ $where,
)->executeQuery()->fetchAssociative();
if (!$result) {
throw new NoSuchHaikuException('Haiku with title ' . htmlspecialchars($title) . 'not found.', 1664390496);
diff --git a/Classes/EventListener/LinkValidator/CheckExternalLinksToLocalPagesEventListener.php b/Classes/EventListener/LinkValidator/CheckExternalLinksToLocalPagesEventListener.php
index ea0b190..2bc622d 100644
--- a/Classes/EventListener/LinkValidator/CheckExternalLinksToLocalPagesEventListener.php
+++ b/Classes/EventListener/LinkValidator/CheckExternalLinksToLocalPagesEventListener.php
@@ -56,7 +56,7 @@ private function parseField(array $record, array $results): array
self::TABLE_NAME,
self::FIELD_NAME,
$record['uid'],
- (string)$record[self::FIELD_NAME]
+ (string)$record[self::FIELD_NAME],
);
if (!$parserResult->hasMatched()) {
continue;
@@ -68,7 +68,7 @@ private function parseField(array $record, array $results): array
$this->matchUrl(
(string)$matchedElement['subst']['tokenValue'],
$record,
- $results
+ $results,
);
}
}
@@ -79,7 +79,7 @@ private function findAllParsers(array $conf): iterable
{
return $this->softReferenceParserFactory->getParsersBySoftRefParserList(
$conf['softref'],
- ['subst']
+ ['subst'],
);
}
diff --git a/Classes/Http/MeowInformationRequester.php b/Classes/Http/MeowInformationRequester.php
index 8985cda..0919a77 100644
--- a/Classes/Http/MeowInformationRequester.php
+++ b/Classes/Http/MeowInformationRequester.php
@@ -46,18 +46,18 @@ public function request(): string
$response = $this->requestFactory->request(
self::API_URL,
'GET',
- $additionalOptions
+ $additionalOptions,
);
if ($response->getStatusCode() !== 200) {
throw new \RuntimeException(
- 'Returned status code is ' . $response->getStatusCode()
+ 'Returned status code is ' . $response->getStatusCode(),
);
}
if ($response->getHeaderLine('Content-Type') !== 'application/json') {
throw new \RuntimeException(
- 'The request did not return JSON data'
+ 'The request did not return JSON data',
);
}
// Get the content as a string on a successful request
diff --git a/Classes/LinkHandler/GithubLinkBuilder.php b/Classes/LinkHandler/GithubLinkBuilder.php
index dc7fc78..7feb4fa 100644
--- a/Classes/LinkHandler/GithubLinkBuilder.php
+++ b/Classes/LinkHandler/GithubLinkBuilder.php
@@ -33,7 +33,7 @@ public function build(
array &$linkDetails,
string $linkText,
string $target,
- array $conf
+ array $conf,
): LinkResultInterface {
$issueId = (int)$linkDetails['issue'];
if ($issueId < 1) {
@@ -42,7 +42,7 @@ public function build(
// Use the Unix timestamp of the time of creation of this message
1665304602,
null,
- $linkText
+ $linkText,
);
}
$url = 'https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-CoreApi/issues/' . $issueId;
diff --git a/Classes/LinkValidator/LinkType/ExampleLinkType.php b/Classes/LinkValidator/LinkType/ExampleLinkType.php
index 663d8cc..de777db 100644
--- a/Classes/LinkValidator/LinkType/ExampleLinkType.php
+++ b/Classes/LinkValidator/LinkType/ExampleLinkType.php
@@ -39,7 +39,7 @@ public function getErrorMessage($errorParams): string
// fall back to generic error message
default => sprintf(
$lang->sL('LLL:EXT:linkvalidator/Resources/Private/Language/Module/locallang.xlf:list.report.externalerror'),
- $errorParams['errno']
+ $errorParams['errno'],
),
};
}
diff --git a/Classes/Middleware/HaikuSeasonList.php b/Classes/Middleware/HaikuSeasonList.php
index db4d2fc..50acdd1 100644
--- a/Classes/Middleware/HaikuSeasonList.php
+++ b/Classes/Middleware/HaikuSeasonList.php
@@ -42,7 +42,7 @@ final class HaikuSeasonList implements MiddlewareInterface
public function __construct(
private readonly LanguageServiceFactory $languageServiceFactory,
private readonly ResponseFactoryInterface $responseFactory,
- private readonly StreamFactoryInterface $streamFactory
+ private readonly StreamFactoryInterface $streamFactory,
) {}
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
@@ -61,7 +61,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
private function getSeasons(ServerRequestInterface $request): array
{
$languageService = $this->languageServiceFactory->createFromSiteLanguage(
- $request->getAttribute('language') ?? $request->getAttribute('site')->getDefaultLanguage()
+ $request->getAttribute('language') ?? $request->getAttribute('site')->getDefaultLanguage(),
);
$translatedSeasons = [];
diff --git a/Classes/Reaction/ExampleReactionType.php b/Classes/Reaction/ExampleReactionType.php
index 7ed0554..3d40c18 100644
--- a/Classes/Reaction/ExampleReactionType.php
+++ b/Classes/Reaction/ExampleReactionType.php
@@ -56,7 +56,7 @@ public static function getIconIdentifier(): string
public function react(
ServerRequestInterface $request,
array $payload,
- ReactionInstruction $reaction
+ ReactionInstruction $reaction,
): ResponseInterface {
$id = (int)($payload['id'] ?? 0);
if ($id <= 0) {
diff --git a/Configuration/TCA/Overrides/be_users.php b/Configuration/TCA/Overrides/be_users.php
index e2a9950..de961ea 100644
--- a/Configuration/TCA/Overrides/be_users.php
+++ b/Configuration/TCA/Overrides/be_users.php
@@ -31,5 +31,5 @@
'be_users',
'tx_examples_mobile',
'',
- 'after:email'
+ 'after:email',
);
diff --git a/Configuration/TCA/Overrides/fe_users.php b/Configuration/TCA/Overrides/fe_users.php
index 69cb9b8..b628bc7 100644
--- a/Configuration/TCA/Overrides/fe_users.php
+++ b/Configuration/TCA/Overrides/fe_users.php
@@ -70,5 +70,5 @@
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'fe_users',
- 'tx_examples_options, tx_examples_special'
+ 'tx_examples_options, tx_examples_special',
);
diff --git a/Configuration/TCA/Overrides/pages.php b/Configuration/TCA/Overrides/pages.php
index 7f120e0..4d25f05 100644
--- a/Configuration/TCA/Overrides/pages.php
+++ b/Configuration/TCA/Overrides/pages.php
@@ -53,7 +53,7 @@
'pages',
'media',
'--linebreak--,tx_examples_related_pages',
- 'after:media'
+ 'after:media',
);
// SAME as registered in ext_tables.php
diff --git a/Configuration/TCA/Overrides/sys_reaction.php b/Configuration/TCA/Overrides/sys_reaction.php
index f46b87f..792dd10 100644
--- a/Configuration/TCA/Overrides/sys_reaction.php
+++ b/Configuration/TCA/Overrides/sys_reaction.php
@@ -22,5 +22,5 @@
'label' => \T3docs\Examples\Reaction\ExampleReactionType::getDescription(),
'value' => \T3docs\Examples\Reaction\ExampleReactionType::getType(),
'icon' => \T3docs\Examples\Reaction\ExampleReactionType::getIconIdentifier(),
- ]
+ ],
);
diff --git a/Configuration/TCA/Overrides/sys_template.php b/Configuration/TCA/Overrides/sys_template.php
index f9f668c..1d41e38 100644
--- a/Configuration/TCA/Overrides/sys_template.php
+++ b/Configuration/TCA/Overrides/sys_template.php
@@ -19,11 +19,11 @@
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'examples',
'Configuration/TypoScript/',
- 'Examples TypoScript'
+ 'Examples TypoScript',
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'examples',
'Configuration/TypoScript/HmenuSpecial/',
- 'Examples: HMENU special userfunc'
+ 'Examples: HMENU special userfunc',
);
diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php
index 9b259a0..6bcb7c4 100644
--- a/Configuration/TCA/Overrides/tt_content.php
+++ b/Configuration/TCA/Overrides/tt_content.php
@@ -91,14 +91,14 @@
ExtensionManagementUtility::addTCAcolumns(
'tt_content',
- $temporaryColumn
+ $temporaryColumn,
);
ExtensionManagementUtility::addFieldsToPalette(
'tt_content',
'access',
'tx_examples_noprint',
- 'before:editlock'
+ 'before:editlock',
);
// Create various FE plugins to demonstrate FlexForms definition
@@ -111,7 +111,7 @@
'examples_pi2',
],
'list_type',
- 'examples'
+ 'examples',
);
ExtensionManagementUtility::addPlugin(
[
@@ -119,7 +119,7 @@
'examples_pi3',
],
'list_type',
- 'examples'
+ 'examples',
);
ExtensionManagementUtility::addPlugin(
[
@@ -127,20 +127,20 @@
'examples_pi4',
],
'list_type',
- 'examples'
+ 'examples',
);
// Register the "error" plugin
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Examples',
'Error',
- 'LLL:EXT:examples/Resources/Private/Language/locallang_db.xlf:tt_content.list_type_pierror'
+ 'LLL:EXT:examples/Resources/Private/Language/locallang_db.xlf:tt_content.list_type_pierror',
);
// Register the FAL example plugin
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
'Examples',
'FalExamples',
- 'LLL:EXT:examples/Resources/Private/Language/locallang.xlf:falexample_plugin_title'
+ 'LLL:EXT:examples/Resources/Private/Language/locallang.xlf:falexample_plugin_title',
);
// Disable the display of layout and select_key fields for the plugins
@@ -154,17 +154,17 @@
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['examples_pi2'] = 'pi_flexform';
ExtensionManagementUtility::addPiFlexFormValue(
'examples_pi2',
- 'FILE:EXT:examples/Configuration/Flexforms/flexform_ds2.xml'
+ 'FILE:EXT:examples/Configuration/Flexforms/flexform_ds2.xml',
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['examples_pi3'] = 'pi_flexform';
ExtensionManagementUtility::addPiFlexFormValue(
'examples_pi3',
- 'FILE:EXT:examples/Configuration/Flexforms/flexform_ds3.xml'
+ 'FILE:EXT:examples/Configuration/Flexforms/flexform_ds3.xml',
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['examples_pi4'] = 'pi_flexform';
ExtensionManagementUtility::addPiFlexFormValue(
'examples_pi4',
- 'FILE:EXT:examples/Configuration/Flexforms/flexform_ds4.xml'
+ 'FILE:EXT:examples/Configuration/Flexforms/flexform_ds4.xml',
);
$standardTabs = '--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
@@ -220,7 +220,7 @@
'icon' => 'content-text',
],
'textmedia',
- 'after'
+ 'after',
);
// Configure the default backend fields for the content element
diff --git a/Configuration/TCA/Overrides/tt_content_plugin_haiku_detail.php b/Configuration/TCA/Overrides/tt_content_plugin_haiku_detail.php
index 4fafa13..eed4cbc 100644
--- a/Configuration/TCA/Overrides/tt_content_plugin_haiku_detail.php
+++ b/Configuration/TCA/Overrides/tt_content_plugin_haiku_detail.php
@@ -22,7 +22,7 @@
'tx_examples-haiku',
],
'list_type',
- 'examples'
+ 'examples',
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['examples_haiku_detail'] = 'pages,layout,select_key,recursive';
@@ -31,5 +31,5 @@
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'examples_haiku_detail',
- 'FILE:EXT:examples/Configuration/Flexforms/PluginHaikuDetail.xml'
+ 'FILE:EXT:examples/Configuration/Flexforms/PluginHaikuDetail.xml',
);
diff --git a/Configuration/TCA/Overrides/tt_content_plugin_haiku_list.php b/Configuration/TCA/Overrides/tt_content_plugin_haiku_list.php
index c632e0b..18ff30a 100644
--- a/Configuration/TCA/Overrides/tt_content_plugin_haiku_list.php
+++ b/Configuration/TCA/Overrides/tt_content_plugin_haiku_list.php
@@ -22,7 +22,7 @@
'tx_examples-haiku',
],
'list_type',
- 'examples'
+ 'examples',
);
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['examples_haiku_list'] = 'pages,layout,select_key,recursive';
@@ -31,5 +31,5 @@
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'examples_haiku_list',
- 'FILE:EXT:examples/Configuration/Flexforms/PluginHaikuList.xml'
+ 'FILE:EXT:examples/Configuration/Flexforms/PluginHaikuList.xml',
);
diff --git a/Configuration/TCA/Overrides/tt_content_plugin_htmlparser.php b/Configuration/TCA/Overrides/tt_content_plugin_htmlparser.php
index 5e043ae..89fc691 100644
--- a/Configuration/TCA/Overrides/tt_content_plugin_htmlparser.php
+++ b/Configuration/TCA/Overrides/tt_content_plugin_htmlparser.php
@@ -26,7 +26,7 @@
$pluginSignature = ExtensionUtility::registerPlugin(
$extensionKey,
$pluginName,
- $pluginTitle
+ $pluginTitle,
);
// $pluginSignature == "examples_htmlparser"
@@ -39,5 +39,5 @@
// Configure FlexForm
ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature,
- 'FILE:EXT:examples/Configuration/Flexforms/HtmlParser.xml'
+ 'FILE:EXT:examples/Configuration/Flexforms/HtmlParser.xml',
);
diff --git a/Configuration/TCA/Overrides/tt_content_plugin_pi1.php b/Configuration/TCA/Overrides/tt_content_plugin_pi1.php
index c8644e8..172c035 100644
--- a/Configuration/TCA/Overrides/tt_content_plugin_pi1.php
+++ b/Configuration/TCA/Overrides/tt_content_plugin_pi1.php
@@ -25,7 +25,7 @@
ExtensionManagementUtility::addPlugin(
[ $pluginTitle, $pluginSignature],
'list_type',
- $extensionKey
+ $extensionKey,
);
// Disable the display of layout and select_key fields for the plugin
@@ -36,5 +36,5 @@
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['examples_pi1'] = 'pi_flexform';
ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature,
- 'FILE:EXT:examples/Configuration/Flexforms/flexform_ds1.xml'
+ 'FILE:EXT:examples/Configuration/Flexforms/flexform_ds1.xml',
);
diff --git a/ext_localconf.php b/ext_localconf.php
index c1089a5..bba40bd 100644
--- a/ext_localconf.php
+++ b/ext_localconf.php
@@ -99,7 +99,7 @@
],
[
\T3docs\Examples\Controller\ErrorController::class => 'index',
- ]
+ ],
);
// Configure the HTML parser plugin
@@ -108,7 +108,7 @@
'HtmlParser',
[
\T3docs\Examples\Controller\HtmlParserController::class => 'index',
- ]
+ ],
);
// Register the FAL examples plugin
@@ -121,7 +121,7 @@
// non-cacheable actions
[
\T3docs\Examples\Controller\FalExampleController::class => 'index,listFiles,collection',
- ]
+ ],
);
// Add custom translations overriding default labels
diff --git a/ext_tables.php b/ext_tables.php
index 67cc45b..396a3ff 100644
--- a/ext_tables.php
+++ b/ext_tables.php
@@ -27,7 +27,7 @@
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToUserSettings(
'tx_examples_mobile',
- 'after:email'
+ 'after:email',
);
// Settings for new tables, which do not belong to Configuration/TCA
@@ -41,6 +41,6 @@
[
'type' => 'web',
'allowedTables' => '*',
- ]
+ ],
);
})();