diff --git a/Classes/ContextMenu/HelloWorldItemProvider.php b/Classes/ContextMenu/HelloWorldItemProvider.php index 2af4cad..d08cfdb 100644 --- a/Classes/ContextMenu/HelloWorldItemProvider.php +++ b/Classes/ContextMenu/HelloWorldItemProvider.php @@ -89,7 +89,7 @@ public function addItems(array $items): array $position = array_search('info', array_keys($items), true); //slices array into two parts - $beginning = array_slice($items, 0, $position+1, true); + $beginning = array_slice($items, 0, $position + 1, true); $end = array_slice($items, $position, null, true); // adds custom item in the correct position diff --git a/Classes/Controller/Haiku/DetailController.php b/Classes/Controller/Haiku/DetailController.php index 9b93040..b9d32f7 100644 --- a/Classes/Controller/Haiku/DetailController.php +++ b/Classes/Controller/Haiku/DetailController.php @@ -58,7 +58,7 @@ public function main(string $content, array $conf, ServerRequestInterface $reque $this->loadFlexFormSettings(); $this->view = $this->viewService->createView($request, $this->conf, 'Haiku/Detail'); - $parameter = $request->getQueryParams()['tx_examples_haiku']??[]; + $parameter = $request->getQueryParams()['tx_examples_haiku'] ?? []; $action = $parameter['action'] ?? ''; try { return match ($action) { diff --git a/Classes/Http/MeowInformationRequester.php b/Classes/Http/MeowInformationRequester.php index 07a2301..3683559 100644 --- a/Classes/Http/MeowInformationRequester.php +++ b/Classes/Http/MeowInformationRequester.php @@ -63,7 +63,7 @@ public function request(): string } // Get the content as a string on a successful request $content = $response->getBody()->getContents(); - return (string)json_decode($content, true, flags: JSON_THROW_ON_ERROR)['fact']?? + return (string)json_decode($content, true, flags: JSON_THROW_ON_ERROR)['fact'] ?? throw new \RuntimeException('The service returned an unexpected format.', 1666413230); } } diff --git a/Classes/LinkHandler/GitHubLinkHandler.php b/Classes/LinkHandler/GitHubLinkHandler.php index 3c4c26c..c4c2251 100644 --- a/Classes/LinkHandler/GitHubLinkHandler.php +++ b/Classes/LinkHandler/GitHubLinkHandler.php @@ -65,7 +65,7 @@ public function canHandleLink(array $linkParts): bool if ($linkParts['type'] !== 'github') { return false; } - $this->linkParts = $linkParts['url']??[]; + $this->linkParts = $linkParts['url'] ?? []; return true; } @@ -75,7 +75,7 @@ public function canHandleLink(array $linkParts): bool public function formatCurrentUrl(): string { return 'https://github.com/' . $this->configuration['project'] . '/' - . $this->configuration['action'] . '/' . $this->linkParts['issue']??''; + . $this->configuration['action'] . '/' . $this->linkParts['issue'] ?? ''; } /** diff --git a/Configuration/TCA/Overrides/tt_content_plugin_haiku_detail.php b/Configuration/TCA/Overrides/tt_content_plugin_haiku_detail.php index b7fa6ba..4fafa13 100644 --- a/Configuration/TCA/Overrides/tt_content_plugin_haiku_detail.php +++ b/Configuration/TCA/Overrides/tt_content_plugin_haiku_detail.php @@ -25,9 +25,9 @@ 'examples' ); -$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['examples_haiku_detail']='pages,layout,select_key,recursive'; +$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['examples_haiku_detail'] = 'pages,layout,select_key,recursive'; -$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['examples_haiku_detail']='pi_flexform'; +$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['examples_haiku_detail'] = 'pi_flexform'; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'examples_haiku_detail', diff --git a/Configuration/TCA/Overrides/tt_content_plugin_haiku_list.php b/Configuration/TCA/Overrides/tt_content_plugin_haiku_list.php index d229015..c632e0b 100644 --- a/Configuration/TCA/Overrides/tt_content_plugin_haiku_list.php +++ b/Configuration/TCA/Overrides/tt_content_plugin_haiku_list.php @@ -25,9 +25,9 @@ 'examples' ); -$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['examples_haiku_list']='pages,layout,select_key,recursive'; +$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['examples_haiku_list'] = 'pages,layout,select_key,recursive'; -$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['examples_haiku_list']='pi_flexform'; +$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['examples_haiku_list'] = 'pi_flexform'; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'examples_haiku_list',