diff --git a/Classes/Backend/PageLayoutHeader.php b/Classes/Backend/PageLayoutHeader.php index 29e32dbd..1a2f3677 100644 --- a/Classes/Backend/PageLayoutHeader.php +++ b/Classes/Backend/PageLayoutHeader.php @@ -24,7 +24,7 @@ public function __construct( /** * @param array|null $params */ - public function render(array $params = null, PageLayoutController|ModuleTemplate|null $parentObj = null): string + public function render(?array $params = null, PageLayoutController|ModuleTemplate|null $parentObj = null): string { $languageId = $this->getLanguageId(); $pageId = (int)$_GET['id']; diff --git a/Classes/Controller/AbstractBackendController.php b/Classes/Controller/AbstractBackendController.php index 9799f72b..19f134a2 100644 --- a/Classes/Controller/AbstractBackendController.php +++ b/Classes/Controller/AbstractBackendController.php @@ -22,7 +22,7 @@ abstract class AbstractBackendController extends ActionController /** * @param array $data */ - protected function returnResponse(string $template, array $data = [], ModuleTemplate $moduleTemplate = null): ResponseInterface + protected function returnResponse(string $template, array $data = [], ?ModuleTemplate $moduleTemplate = null): ResponseInterface { $data['layout'] = GeneralUtility::makeInstance(Typo3Version::class) ->getMajorVersion() < 13 ? 'Default' : 'Module'; diff --git a/Classes/EventListener/RecordCanonicalListener.php b/Classes/EventListener/RecordCanonicalListener.php index 0d1162a4..769da538 100644 --- a/Classes/EventListener/RecordCanonicalListener.php +++ b/Classes/EventListener/RecordCanonicalListener.php @@ -13,7 +13,7 @@ class RecordCanonicalListener { protected RecordService $recordService; - public function __construct(RecordService $recordService = null) + public function __construct(?RecordService $recordService = null) { if ($recordService === null) { $recordService = GeneralUtility::makeInstance(RecordService::class); diff --git a/Classes/MetaTag/Generator/AbstractGenerator.php b/Classes/MetaTag/Generator/AbstractGenerator.php index f9bc4e28..6574755f 100644 --- a/Classes/MetaTag/Generator/AbstractGenerator.php +++ b/Classes/MetaTag/Generator/AbstractGenerator.php @@ -16,7 +16,7 @@ abstract class AbstractGenerator implements GeneratorInterface { protected MetaTagManagerRegistry $managerRegistry; - public function __construct(MetaTagManagerRegistry $managerRegistry = null) + public function __construct(?MetaTagManagerRegistry $managerRegistry = null) { if ($managerRegistry === null) { $managerRegistry = GeneralUtility::makeInstance(MetaTagManagerRegistry::class); diff --git a/Classes/PageTitle/RecordPageTitleProvider.php b/Classes/PageTitle/RecordPageTitleProvider.php index 14d9e878..9505dfcd 100644 --- a/Classes/PageTitle/RecordPageTitleProvider.php +++ b/Classes/PageTitle/RecordPageTitleProvider.php @@ -13,7 +13,7 @@ class RecordPageTitleProvider extends AbstractPageTitleProvider { protected RecordService $recordService; - public function __construct(RecordService $recordService = null) + public function __construct(?RecordService $recordService = null) { if ($recordService === null) { $recordService = GeneralUtility::makeInstance(RecordService::class); diff --git a/Classes/Utility/JavascriptUtility.php b/Classes/Utility/JavascriptUtility.php index 327f9bb4..0fb45822 100644 --- a/Classes/Utility/JavascriptUtility.php +++ b/Classes/Utility/JavascriptUtility.php @@ -10,7 +10,7 @@ class JavascriptUtility { - public static function loadJavascript(PageRenderer $pageRenderer = null): void + public static function loadJavascript(?PageRenderer $pageRenderer = null): void { if ($pageRenderer === null) { $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);