diff --git a/typo3/sysext/backend/Classes/Configuration/SiteTcaConfiguration.php b/typo3/sysext/backend/Classes/Configuration/SiteTcaConfiguration.php index 9347d2907d4bf894560d8632fdd525a3a2f90f96..1b32aeb37d1cdb657d275a8b8c8ce337ef150240 100644 --- a/typo3/sysext/backend/Classes/Configuration/SiteTcaConfiguration.php +++ b/typo3/sysext/backend/Classes/Configuration/SiteTcaConfiguration.php @@ -1,5 +1,6 @@ <?php declare(strict_types = 1); + namespace TYPO3\CMS\Backend\Configuration; /* diff --git a/typo3/sysext/backend/Classes/Form/FormDataProvider/SiteTcaInline.php b/typo3/sysext/backend/Classes/Form/FormDataProvider/SiteTcaInline.php index 9b6e5400f2c04e9ba589b0d879732c9939e64481..c4cf7d380a04782332d00c83bcaaf91ca693b3ab 100644 --- a/typo3/sysext/backend/Classes/Form/FormDataProvider/SiteTcaInline.php +++ b/typo3/sysext/backend/Classes/Form/FormDataProvider/SiteTcaInline.php @@ -1,5 +1,6 @@ <?php declare(strict_types = 1); + namespace TYPO3\CMS\Backend\Form\FormDataProvider; /* @@ -84,7 +85,7 @@ class SiteTcaInline extends AbstractDatabaseRecordProvider implements FormDataPr // If the parent is a page, use the uid(!) of the (new?) page as pid for the child records: if ($table === 'pages') { $liveVersionId = BackendUtility::getLiveVersionIdOfRecord('pages', $row['uid']); - $pid = $liveVersionId === null ? $row['uid'] : $liveVersionId; + $pid = $liveVersionId ?? $row['uid']; } elseif ($row['pid'] < 0) { $prevRec = BackendUtility::getRecord($table, abs($row['pid'])); $pid = $prevRec['pid']; @@ -256,7 +257,7 @@ class SiteTcaInline extends AbstractDatabaseRecordProvider implements FormDataPr 'inlineTopMostParentFieldName' => $result['inlineTopMostParentFieldName'] ?: $inlineTopMostParent['field'], ]; - if ($parentConfig['foreign_selector'] && $parentConfig['appearance']['useCombination']) { + if ($parentConfig['foreign_selector'] && ($parentConfig['appearance']['useCombination'] ?? false)) { throw new \RuntimeException('useCombination not implemented in sites module', 1522493097); } return $formDataCompiler->compile($formDataCompilerInput); diff --git a/typo3/sysext/backend/Classes/Routing/PageUriBuilder.php b/typo3/sysext/backend/Classes/Routing/PageUriBuilder.php index 13e5cca310bb8205c9b44563d2dffea8e4b9e0fa..b1242da15bcd49effda85b7778d14d411da1b5da 100644 --- a/typo3/sysext/backend/Classes/Routing/PageUriBuilder.php +++ b/typo3/sysext/backend/Classes/Routing/PageUriBuilder.php @@ -1,5 +1,6 @@ <?php declare(strict_types = 1); + namespace TYPO3\CMS\Backend\Routing; /* @@ -36,12 +37,12 @@ class PageUriBuilder implements SingletonInterface /** * Generates an absolute URL */ - const ABSOLUTE_URL = 'url'; + public const ABSOLUTE_URL = 'url'; /** * Generates an absolute path */ - const ABSOLUTE_PATH = 'path'; + public const ABSOLUTE_PATH = 'path'; /** * @var SiteFinder diff --git a/typo3/sysext/core/Classes/Site/Entity/Site.php b/typo3/sysext/core/Classes/Site/Entity/Site.php index 908009a9d9298f9c0581aada737983c3bd475f90..36205a03dba1920224397e51eddb88d51a11337c 100644 --- a/typo3/sysext/core/Classes/Site/Entity/Site.php +++ b/typo3/sysext/core/Classes/Site/Entity/Site.php @@ -1,5 +1,6 @@ <?php declare(strict_types = 1); + namespace TYPO3\CMS\Core\Site\Entity; /* @@ -25,9 +26,9 @@ use TYPO3\CMS\Frontend\PageErrorHandler\PageErrorHandlerInterface; */ class Site { - const ERRORHANDLER_TYPE_PAGE = 'Page'; - const ERRORHANDLER_TYPE_FLUID = 'Fluid'; - const ERRORHANDLER_TYPE_PHP = 'PHP'; + protected const ERRORHANDLER_TYPE_PAGE = 'Page'; + protected const ERRORHANDLER_TYPE_FLUID = 'Fluid'; + protected const ERRORHANDLER_TYPE_PHP = 'PHP'; /** * @var string @@ -186,7 +187,7 @@ class Site // Check if the interface is implemented $handler = GeneralUtility::makeInstance($errorHandler['errorPhpClassFQCN'], $type, $errorHandler); if (!($handler instanceof PageErrorHandlerInterface)) { - // throw new exception + // @todo throw new exception } return $handler; } diff --git a/typo3/sysext/core/Classes/Site/Entity/SiteLanguage.php b/typo3/sysext/core/Classes/Site/Entity/SiteLanguage.php index 2fc49c87b3b5effe62fe72efd32219fd61b21acc..126155a1b010106dfd18d476a1765b75c5c0223a 100644 --- a/typo3/sysext/core/Classes/Site/Entity/SiteLanguage.php +++ b/typo3/sysext/core/Classes/Site/Entity/SiteLanguage.php @@ -1,5 +1,6 @@ <?php declare(strict_types = 1); + namespace TYPO3\CMS\Core\Site\Entity; /* @@ -159,7 +160,7 @@ class SiteLanguage * * @return array */ - public function toArray() + public function toArray(): array { return [ 'languageId' => $this->getLanguageId(), diff --git a/typo3/sysext/core/Classes/Site/SiteFinder.php b/typo3/sysext/core/Classes/Site/SiteFinder.php index 3c92524cde130b7fbb8831d9aab0b4db8bdd3ec0..48f9503bf6191407535cdaeb16b0029fe1ad7142 100644 --- a/typo3/sysext/core/Classes/Site/SiteFinder.php +++ b/typo3/sysext/core/Classes/Site/SiteFinder.php @@ -1,5 +1,6 @@ <?php declare(strict_types = 1); + namespace TYPO3\CMS\Core\Site; /* @@ -21,7 +22,6 @@ use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction; use TYPO3\CMS\Core\Exception\SiteNotFoundException; use TYPO3\CMS\Core\Site\Entity\Site; -use TYPO3\CMS\Core\Site\Entity\SiteLanguage; use TYPO3\CMS\Core\Utility\GeneralUtility; /** @@ -73,7 +73,6 @@ class SiteFinder { $baseUrls = []; foreach ($this->sites as $site) { - /** @var SiteLanguage $language */ foreach ($site->getLanguages() as $language) { $baseUrls[$language->getBase()] = $language; if ($language->getLanguageId() === 0) { diff --git a/typo3/sysext/frontend/Classes/PageErrorHandler/DefaultPHPErrorHandler.php b/typo3/sysext/frontend/Classes/PageErrorHandler/DefaultPHPErrorHandler.php deleted file mode 100644 index 9c6b37aa751a0701768925791af276cddbafea26..0000000000000000000000000000000000000000 --- a/typo3/sysext/frontend/Classes/PageErrorHandler/DefaultPHPErrorHandler.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php -declare(strict_types = 1); -namespace TYPO3\CMS\Frontend\PageErrorHandler; - -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -use Psr\Http\Message\ResponseInterface; -use Psr\Http\Message\ServerRequestInterface; -use TYPO3\CMS\Core\Http\HtmlResponse; - -class DefaultPHPErrorHandler implements PageErrorHandlerInterface -{ - - /* - /$$$$$$$ -| $$__ $$ -| $$ \ $$ /$$$$$$ /$$$$$$/$$$$ /$$$$$$ /$$ /$$ /$$$$$$ -| $$$$$$$/ /$$__ $$| $$_ $$_ $$ /$$__ $$| $$ /$$//$$__ $$ -| $$__ $$| $$$$$$$$| $$ \ $$ \ $$| $$ \ $$ \ $$/$$/| $$$$$$$$ -| $$ \ $$| $$_____/| $$ | $$ | $$| $$ | $$ \ $$$/ | $$_____/ -| $$ | $$| $$$$$$$| $$ | $$ | $$| $$$$$$/ \ $/ | $$$$$$$ -|__/ |__/ \_______/|__/ |__/ |__/ \______/ \_/ \_______/ - - - - /$$ - | $$ - /$$ /$$ /$$| $$$$$$$ /$$$$$$ /$$$$$$$ -| $$ | $$ | $$| $$__ $$ /$$__ $$| $$__ $$ -| $$ | $$ | $$| $$ \ $$| $$$$$$$$| $$ \ $$ -| $$ | $$ | $$| $$ | $$| $$_____/| $$ | $$ -| $$$$$/$$$$/| $$ | $$| $$$$$$$| $$ | $$ - \_____/\___/ |__/ |__/ \_______/|__/ |__/ - - - - /$$ - | $$ - /$$$$$$/$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$ -| $$_ $$_ $$ /$$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ /$$__ $$ -| $$ \ $$ \ $$| $$$$$$$$| $$ \__/| $$ \ $$| $$$$$$$$| $$ | $$ -| $$ | $$ | $$| $$_____/| $$ | $$ | $$| $$_____/| $$ | $$ -| $$ | $$ | $$| $$$$$$$| $$ | $$$$$$$| $$$$$$$| $$$$$$$ -|__/ |__/ |__/ \_______/|__/ \____ $$ \_______/ \_______/ - /$$ \ $$ - | $$$$$$/ - \______/ - */ - - /** - * @var int - */ - protected $statusCode; - - public function __construct(int $statusCode, array $configuration) - { - $this->statusCode = $statusCode; - } - - /** - * @param ServerRequestInterface $request - * @param string $message - * @param array $reasons - * @return ResponseInterface - */ - public function handlePageError(ServerRequestInterface $request, string $message, array $reasons = []): ResponseInterface - { - return new HtmlResponse('go away', $this->statusCode); - } -} diff --git a/typo3/sysext/frontend/Classes/PageErrorHandler/FluidPageErrorHandler.php b/typo3/sysext/frontend/Classes/PageErrorHandler/FluidPageErrorHandler.php index 1734ac7eefa412e43f3df19ac5e4a2efbe9e2593..074af5a8f5d905b155a061a9f7078c5edebd991e 100644 --- a/typo3/sysext/frontend/Classes/PageErrorHandler/FluidPageErrorHandler.php +++ b/typo3/sysext/frontend/Classes/PageErrorHandler/FluidPageErrorHandler.php @@ -1,5 +1,6 @@ <?php declare(strict_types = 1); + namespace TYPO3\CMS\Frontend\PageErrorHandler; /* diff --git a/typo3/sysext/frontend/Classes/PageErrorHandler/PageContentErrorHandler.php b/typo3/sysext/frontend/Classes/PageErrorHandler/PageContentErrorHandler.php index 7e06cc89c4c8f9b35fb953c3d112747e894657a1..3e5a32c2174ab90c21d08ad985b5f888bd286b60 100644 --- a/typo3/sysext/frontend/Classes/PageErrorHandler/PageContentErrorHandler.php +++ b/typo3/sysext/frontend/Classes/PageErrorHandler/PageContentErrorHandler.php @@ -1,5 +1,6 @@ <?php declare(strict_types = 1); + namespace TYPO3\CMS\Frontend\PageErrorHandler; /*