From 38660dbc5e3e16af9284ed77ab69116d8817e96b Mon Sep 17 00:00:00 2001 From: Christian Kuhn <lolli@schwarzbu.ch> Date: Fri, 18 Nov 2022 00:18:17 +0100 Subject: [PATCH] [TASK] Clean up ext:adminpanel Remove a series of property and param annotations specified by signatures already. Resolves: #99124 Releases: main Change-Id: I18d3aa2d798c71a96ccd8c47f71c276172091401 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76668 Tested-by: core-ci <typo3@b13.com> Tested-by: Benni Mack <benni@typo3.org> Reviewed-by: Benni Mack <benni@typo3.org> Tested-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../Classes/Controller/MainController.php | 2 -- .../Classes/Log/DoctrineSqlLogger.php | 9 --------- .../Classes/Log/InMemoryLogWriter.php | 2 -- .../Middleware/AdminPanelDataPersister.php | 3 --- .../Classes/Middleware/AdminPanelInitiator.php | 4 ---- .../Classes/Middleware/AdminPanelRenderer.php | 3 --- .../Classes/Middleware/SqlLogging.php | 3 --- .../Classes/ModuleApi/AbstractModule.php | 4 ---- .../ModuleApi/ConfigurableInterface.php | 2 -- .../ModuleApi/ContentProviderInterface.php | 3 --- .../ModuleApi/DataProviderInterface.php | 4 ---- .../Classes/ModuleApi/ModuleInterface.php | 4 ---- .../ModuleSettingsProviderInterface.php | 3 --- .../ModuleApi/OnSubmitActorInterface.php | 3 --- .../PageSettingsProviderInterface.php | 3 --- .../ModuleApi/RequestEnricherInterface.php | 3 --- .../ModuleApi/ResourceProviderInterface.php | 4 ---- .../ModuleApi/ShortInfoProviderInterface.php | 4 ---- .../ModuleApi/SubmoduleProviderInterface.php | 6 ++---- .../adminpanel/Classes/Modules/CacheModule.php | 11 ----------- .../adminpanel/Classes/Modules/Debug/Log.php | 12 ------------ .../Classes/Modules/Debug/PageTitle.php | 15 --------------- .../Classes/Modules/Debug/QueryInformation.php | 17 ----------------- .../Modules/Info/GeneralInformation.php | 18 +----------------- .../Modules/Info/UserIntInformation.php | 3 --- .../adminpanel/Classes/Modules/InfoModule.php | 3 --- .../Classes/Modules/PreviewModule.php | 18 ------------------ .../Modules/TsDebug/TypoScriptWaterfall.php | 17 +---------------- .../Classes/Modules/TsDebugModule.php | 3 --- .../Repositories/FrontendGroupsRepository.php | 8 -------- .../Classes/Service/ConfigurationService.php | 17 +++-------------- .../Classes/Utility/MemoryUtility.php | 2 -- .../Classes/Utility/ResourceUtility.php | 13 ++----------- .../Classes/Utility/StateUtility.php | 4 ---- .../ViewHelpers/SubModuleRenderViewHelper.php | 7 +------ 35 files changed, 10 insertions(+), 227 deletions(-) diff --git a/typo3/sysext/adminpanel/Classes/Controller/MainController.php b/typo3/sysext/adminpanel/Classes/Controller/MainController.php index 3792863103db..bfa0129312db 100644 --- a/typo3/sysext/adminpanel/Classes/Controller/MainController.php +++ b/typo3/sysext/adminpanel/Classes/Controller/MainController.php @@ -151,8 +151,6 @@ class MainController implements SingletonInterface * Stores data for admin panel in cache - Called in PSR-15 Middleware * * @see \TYPO3\CMS\Adminpanel\Middleware\AdminPanelDataPersister - * - * @throws \TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException */ public function storeData(ServerRequestInterface $request): void { diff --git a/typo3/sysext/adminpanel/Classes/Log/DoctrineSqlLogger.php b/typo3/sysext/adminpanel/Classes/Log/DoctrineSqlLogger.php index 5c79ce7fa1c5..52dc67f905fb 100644 --- a/typo3/sysext/adminpanel/Classes/Log/DoctrineSqlLogger.php +++ b/typo3/sysext/adminpanel/Classes/Log/DoctrineSqlLogger.php @@ -53,9 +53,6 @@ class DoctrineSqlLogger implements SQLLogger, LoggerAwareInterface */ protected $currentQuery = 0; - /** - * {@inheritdoc} - */ public function startQuery($sql, array $params = null, array $types = null) { if ($this->enabled && MemoryUtility::isMemoryConsumptionTooHigh()) { @@ -81,9 +78,6 @@ class DoctrineSqlLogger implements SQLLogger, LoggerAwareInterface } } - /** - * {@inheritdoc} - */ public function stopQuery() { if ($this->enabled) { @@ -91,9 +85,6 @@ class DoctrineSqlLogger implements SQLLogger, LoggerAwareInterface } } - /** - * @return array - */ public function getQueries(): array { return $this->queries; diff --git a/typo3/sysext/adminpanel/Classes/Log/InMemoryLogWriter.php b/typo3/sysext/adminpanel/Classes/Log/InMemoryLogWriter.php index b61ae271bf90..dc5fe97c07f5 100644 --- a/typo3/sysext/adminpanel/Classes/Log/InMemoryLogWriter.php +++ b/typo3/sysext/adminpanel/Classes/Log/InMemoryLogWriter.php @@ -46,8 +46,6 @@ class InMemoryLogWriter extends AbstractWriter * Writes the log record * * @param LogRecord $record Log record - * @return self - * @throws \RuntimeException */ public function writeLog(LogRecord $record): self { diff --git a/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelDataPersister.php b/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelDataPersister.php index b14a32582b63..45519f174733 100644 --- a/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelDataPersister.php +++ b/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelDataPersister.php @@ -35,9 +35,6 @@ class AdminPanelDataPersister implements MiddlewareInterface { /** * Render the admin panel if activated - * @param ServerRequestInterface $request - * @param RequestHandlerInterface $handler - * @return ResponseInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { diff --git a/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelInitiator.php b/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelInitiator.php index 4cacf9db41ce..f4ae6c483b83 100644 --- a/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelInitiator.php +++ b/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelInitiator.php @@ -38,10 +38,6 @@ class AdminPanelInitiator implements MiddlewareInterface * - backend user is logged in * - at least one adminpanel functionality is enabled * - admin panel is open - * - * @param ServerRequestInterface $request - * @param RequestHandlerInterface $handler - * @return ResponseInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { diff --git a/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelRenderer.php b/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelRenderer.php index d919c3f42ddd..b7af76cd39f7 100644 --- a/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelRenderer.php +++ b/typo3/sysext/adminpanel/Classes/Middleware/AdminPanelRenderer.php @@ -36,9 +36,6 @@ class AdminPanelRenderer implements MiddlewareInterface { /** * Render the admin panel if activated - * @param ServerRequestInterface $request - * @param RequestHandlerInterface $handler - * @return ResponseInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { diff --git a/typo3/sysext/adminpanel/Classes/Middleware/SqlLogging.php b/typo3/sysext/adminpanel/Classes/Middleware/SqlLogging.php index 076a5c6d968b..90863809305f 100644 --- a/typo3/sysext/adminpanel/Classes/Middleware/SqlLogging.php +++ b/typo3/sysext/adminpanel/Classes/Middleware/SqlLogging.php @@ -45,9 +45,6 @@ class SqlLogging implements MiddlewareInterface /** * Enable SQL Logging as early as possible to catch all queries if the admin panel is active - * @param ServerRequestInterface $request - * @param RequestHandlerInterface $handler - * @return ResponseInterface */ public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { diff --git a/typo3/sysext/adminpanel/Classes/ModuleApi/AbstractModule.php b/typo3/sysext/adminpanel/Classes/ModuleApi/AbstractModule.php index 12633b85f722..c2a5015796ea 100644 --- a/typo3/sysext/adminpanel/Classes/ModuleApi/AbstractModule.php +++ b/typo3/sysext/adminpanel/Classes/ModuleApi/AbstractModule.php @@ -57,8 +57,6 @@ abstract class AbstractModule implements ModuleInterface, ConfigurableInterface, * -> or any setting is overridden * override is a way to use functionality of the admin panel without displaying the admin panel to users * for example: hidden records or pages can be displayed by default - * - * @return bool */ public function isEnabled(): bool { @@ -107,8 +105,6 @@ abstract class AbstractModule implements ModuleInterface, ConfigurableInterface, /** * Returns true if TSConfig admPanel.enable is set for this module (or all modules) - * - * @return bool */ protected function isEnabledViaTsConfig(): bool { diff --git a/typo3/sysext/adminpanel/Classes/ModuleApi/ConfigurableInterface.php b/typo3/sysext/adminpanel/Classes/ModuleApi/ConfigurableInterface.php index 54ca0d7732a6..9e05108cdf5c 100644 --- a/typo3/sysext/adminpanel/Classes/ModuleApi/ConfigurableInterface.php +++ b/typo3/sysext/adminpanel/Classes/ModuleApi/ConfigurableInterface.php @@ -33,8 +33,6 @@ interface ConfigurableInterface * A module may be enabled but not shown * -> only the initializeModule() method * will be called - * - * @return bool */ public function isEnabled(): bool; } diff --git a/typo3/sysext/adminpanel/Classes/ModuleApi/ContentProviderInterface.php b/typo3/sysext/adminpanel/Classes/ModuleApi/ContentProviderInterface.php index f243f409fc12..bb85d8b82f60 100644 --- a/typo3/sysext/adminpanel/Classes/ModuleApi/ContentProviderInterface.php +++ b/typo3/sysext/adminpanel/Classes/ModuleApi/ContentProviderInterface.php @@ -33,9 +33,6 @@ interface ContentProviderInterface * Return content as HTML. For modules implementing the DataProviderInterface * the "ModuleData" object is automatically filled with the stored data - if * no data is given a "fresh" ModuleData object is injected. - * - * @param \TYPO3\CMS\Adminpanel\ModuleApi\ModuleData $data - * @return string */ public function getContent(ModuleData $data): string; } diff --git a/typo3/sysext/adminpanel/Classes/ModuleApi/DataProviderInterface.php b/typo3/sysext/adminpanel/Classes/ModuleApi/DataProviderInterface.php index b521952ae4e6..13066770715c 100644 --- a/typo3/sysext/adminpanel/Classes/ModuleApi/DataProviderInterface.php +++ b/typo3/sysext/adminpanel/Classes/ModuleApi/DataProviderInterface.php @@ -28,9 +28,5 @@ use Psr\Http\Message\ServerRequestInterface; */ interface DataProviderInterface { - /** - * @param \Psr\Http\Message\ServerRequestInterface $request - * @return \TYPO3\CMS\Adminpanel\ModuleApi\ModuleData - */ public function getDataToStore(ServerRequestInterface $request): ModuleData; } diff --git a/typo3/sysext/adminpanel/Classes/ModuleApi/ModuleInterface.php b/typo3/sysext/adminpanel/Classes/ModuleApi/ModuleInterface.php index b93bfa88aa8c..542da82b8609 100644 --- a/typo3/sysext/adminpanel/Classes/ModuleApi/ModuleInterface.php +++ b/typo3/sysext/adminpanel/Classes/ModuleApi/ModuleInterface.php @@ -27,15 +27,11 @@ interface ModuleInterface /** * Identifier for this module, * for example "preview" or "cache" - * - * @return string */ public function getIdentifier(): string; /** * Module label - * - * @return string */ public function getLabel(): string; } diff --git a/typo3/sysext/adminpanel/Classes/ModuleApi/ModuleSettingsProviderInterface.php b/typo3/sysext/adminpanel/Classes/ModuleApi/ModuleSettingsProviderInterface.php index 86b1208b9adf..38a0e1bc4fab 100644 --- a/typo3/sysext/adminpanel/Classes/ModuleApi/ModuleSettingsProviderInterface.php +++ b/typo3/sysext/adminpanel/Classes/ModuleApi/ModuleSettingsProviderInterface.php @@ -32,8 +32,5 @@ namespace TYPO3\CMS\Adminpanel\ModuleApi; */ interface ModuleSettingsProviderInterface { - /** - * @return string - */ public function getSettings(): string; } diff --git a/typo3/sysext/adminpanel/Classes/ModuleApi/OnSubmitActorInterface.php b/typo3/sysext/adminpanel/Classes/ModuleApi/OnSubmitActorInterface.php index 70b160da871a..bee1cecf34dc 100644 --- a/typo3/sysext/adminpanel/Classes/ModuleApi/OnSubmitActorInterface.php +++ b/typo3/sysext/adminpanel/Classes/ModuleApi/OnSubmitActorInterface.php @@ -29,9 +29,6 @@ interface OnSubmitActorInterface * Executed on saving / submit of the configuration form * Can be used to react to changed settings * (for example: clearing a specific cache) - * - * @param array $configurationToSave - * @param ServerRequestInterface $request */ public function onSubmit(array $configurationToSave, ServerRequestInterface $request): void; } diff --git a/typo3/sysext/adminpanel/Classes/ModuleApi/PageSettingsProviderInterface.php b/typo3/sysext/adminpanel/Classes/ModuleApi/PageSettingsProviderInterface.php index ea85eaff26eb..7cf5c68b5c71 100644 --- a/typo3/sysext/adminpanel/Classes/ModuleApi/PageSettingsProviderInterface.php +++ b/typo3/sysext/adminpanel/Classes/ModuleApi/PageSettingsProviderInterface.php @@ -30,8 +30,5 @@ namespace TYPO3\CMS\Adminpanel\ModuleApi; */ interface PageSettingsProviderInterface { - /** - * @return string - */ public function getPageSettings(): string; } diff --git a/typo3/sysext/adminpanel/Classes/ModuleApi/RequestEnricherInterface.php b/typo3/sysext/adminpanel/Classes/ModuleApi/RequestEnricherInterface.php index 3db3d6b6cc3d..5194612492a4 100644 --- a/typo3/sysext/adminpanel/Classes/ModuleApi/RequestEnricherInterface.php +++ b/typo3/sysext/adminpanel/Classes/ModuleApi/RequestEnricherInterface.php @@ -38,9 +38,6 @@ interface RequestEnricherInterface /** * Initialize the module - runs in the TYPO3 middleware stack at an early point * may manipulate the current request - * - * @param ServerRequestInterface $request - * @return \Psr\Http\Message\ServerRequestInterface */ public function enrich(ServerRequestInterface $request): ServerRequestInterface; } diff --git a/typo3/sysext/adminpanel/Classes/ModuleApi/ResourceProviderInterface.php b/typo3/sysext/adminpanel/Classes/ModuleApi/ResourceProviderInterface.php index 13ffe28e9d2a..929fb8c5b2bd 100644 --- a/typo3/sysext/adminpanel/Classes/ModuleApi/ResourceProviderInterface.php +++ b/typo3/sysext/adminpanel/Classes/ModuleApi/ResourceProviderInterface.php @@ -29,8 +29,6 @@ interface ResourceProviderInterface * Returns a string array with javascript files that will be rendered after the module * * Example: return ['EXT:adminpanel/Resources/Public/JavaScript/Modules/Edit.js']; - * - * @return array */ public function getJavaScriptFiles(): array; @@ -38,8 +36,6 @@ interface ResourceProviderInterface * Returns a string array with css files that will be rendered after the module * * Example: return ['EXT:adminpanel/Resources/Public/JavaScript/Modules/Edit.css']; - * - * @return array */ public function getCssFiles(): array; } diff --git a/typo3/sysext/adminpanel/Classes/ModuleApi/ShortInfoProviderInterface.php b/typo3/sysext/adminpanel/Classes/ModuleApi/ShortInfoProviderInterface.php index b49644c2ba97..2070255eb932 100644 --- a/typo3/sysext/adminpanel/Classes/ModuleApi/ShortInfoProviderInterface.php +++ b/typo3/sysext/adminpanel/Classes/ModuleApi/ShortInfoProviderInterface.php @@ -30,15 +30,11 @@ interface ShortInfoProviderInterface { /** * Displayed directly in the bar - * - * @return string */ public function getShortInfo(): string; /** * Icon identifier - needs to be registered in iconRegistry - * - * @return string */ public function getIconIdentifier(): string; } diff --git a/typo3/sysext/adminpanel/Classes/ModuleApi/SubmoduleProviderInterface.php b/typo3/sysext/adminpanel/Classes/ModuleApi/SubmoduleProviderInterface.php index eba564170ebe..9e100d0bedff 100644 --- a/typo3/sysext/adminpanel/Classes/ModuleApi/SubmoduleProviderInterface.php +++ b/typo3/sysext/adminpanel/Classes/ModuleApi/SubmoduleProviderInterface.php @@ -31,22 +31,20 @@ interface SubmoduleProviderInterface /** * Sets array of module instances (instances of `ModuleInterface`) as submodules * - * @param \TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface[] $subModules + * @param ModuleInterface[] $subModules */ public function setSubModules(array $subModules): void; /** * Returns an array of module instances * - * @return \TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface[] + * @return ModuleInterface[] */ public function getSubModules(): array; /** * Return true if any of the submodules has settings to be rendered * (can be used to render settings in a central place) - * - * @return bool */ public function hasSubmoduleSettings(): bool; } diff --git a/typo3/sysext/adminpanel/Classes/Modules/CacheModule.php b/typo3/sysext/adminpanel/Classes/Modules/CacheModule.php index 5b6002046aa9..85c86ac43c22 100644 --- a/typo3/sysext/adminpanel/Classes/Modules/CacheModule.php +++ b/typo3/sysext/adminpanel/Classes/Modules/CacheModule.php @@ -29,17 +29,11 @@ use TYPO3\CMS\Fluid\View\StandaloneView; class CacheModule extends AbstractModule implements PageSettingsProviderInterface, RequestEnricherInterface, ResourceProviderInterface { - /** - * @return string - */ public function getIconIdentifier(): string { return 'apps-toolbar-menu-cache'; } - /** - * @return string - */ public function getPageSettings(): string { $view = GeneralUtility::makeInstance(StandaloneView::class); @@ -95,9 +89,6 @@ class CacheModule extends AbstractModule implements PageSettingsProviderInterfac return $request; } - /** - * @return array - */ public function getJavaScriptFiles(): array { return ['EXT:adminpanel/Resources/Public/JavaScript/modules/cache.js']; @@ -107,8 +98,6 @@ class CacheModule extends AbstractModule implements PageSettingsProviderInterfac * Returns a string array with css files that will be rendered after the module * * Example: return ['EXT:adminpanel/Resources/Public/JavaScript/Modules/Edit.css']; - * - * @return array */ public function getCssFiles(): array { diff --git a/typo3/sysext/adminpanel/Classes/Modules/Debug/Log.php b/typo3/sysext/adminpanel/Classes/Modules/Debug/Log.php index f83f1e443237..a784d7c57686 100644 --- a/typo3/sysext/adminpanel/Classes/Modules/Debug/Log.php +++ b/typo3/sysext/adminpanel/Classes/Modules/Debug/Log.php @@ -45,9 +45,6 @@ class Log extends AbstractSubModule implements DataProviderInterface, ModuleSett $this->configurationService = GeneralUtility::makeInstance(ConfigurationService::class); } - /** - * @return string - */ public function getIdentifier(): string { return 'debug_log'; @@ -55,8 +52,6 @@ class Log extends AbstractSubModule implements DataProviderInterface, ModuleSett /** * Sub-Module label - * - * @return string */ public function getLabel(): string { @@ -124,9 +119,6 @@ class Log extends AbstractSubModule implements DataProviderInterface, ModuleSett /** * Sub-Module content as rendered HTML - * - * @param \TYPO3\CMS\Adminpanel\ModuleApi\ModuleData $data - * @return string */ public function getContent(ModuleData $data): string { @@ -190,10 +182,6 @@ class Log extends AbstractSubModule implements DataProviderInterface, ModuleSett return $logConfig; } - /** - * @param string $option - * @return string - */ protected function getConfigOption(string $option): string { return $this->configurationService->getConfigurationOption('debug_log', $option); diff --git a/typo3/sysext/adminpanel/Classes/Modules/Debug/PageTitle.php b/typo3/sysext/adminpanel/Classes/Modules/Debug/PageTitle.php index b4b9396c9503..132c2c6196b9 100644 --- a/typo3/sysext/adminpanel/Classes/Modules/Debug/PageTitle.php +++ b/typo3/sysext/adminpanel/Classes/Modules/Debug/PageTitle.php @@ -40,8 +40,6 @@ class PageTitle extends AbstractSubModule implements DataProviderInterface /** * Identifier for this Sub-module, * for example "preview" or "cache" - * - * @return string */ public function getIdentifier(): string { @@ -50,8 +48,6 @@ class PageTitle extends AbstractSubModule implements DataProviderInterface /** * Sub-Module label - * - * @return string */ public function getLabel(): string { @@ -60,10 +56,6 @@ class PageTitle extends AbstractSubModule implements DataProviderInterface ); } - /** - * @param ServerRequestInterface $request - * @return \TYPO3\CMS\Adminpanel\ModuleApi\ModuleData - */ public function getDataToStore(ServerRequestInterface $request): ModuleData { $data = [ @@ -94,7 +86,6 @@ class PageTitle extends AbstractSubModule implements DataProviderInterface } /** - * @param \TYPO3\CMS\Adminpanel\ModuleApi\ModuleData $data * @return string Returns content of admin panel */ public function getContent(ModuleData $data): string @@ -109,17 +100,11 @@ class PageTitle extends AbstractSubModule implements DataProviderInterface return $view->render(); } - /** - * @return bool - */ protected function isNoCacheEnabled(): bool { return (bool)$this->getTypoScriptFrontendController()->no_cache; } - /** - * @return TypoScriptFrontendController - */ protected function getTypoScriptFrontendController(): TypoScriptFrontendController { return $GLOBALS['TSFE']; diff --git a/typo3/sysext/adminpanel/Classes/Modules/Debug/QueryInformation.php b/typo3/sysext/adminpanel/Classes/Modules/Debug/QueryInformation.php index b5177f970ae3..e435c513b9f6 100644 --- a/typo3/sysext/adminpanel/Classes/Modules/Debug/QueryInformation.php +++ b/typo3/sysext/adminpanel/Classes/Modules/Debug/QueryInformation.php @@ -36,8 +36,6 @@ class QueryInformation extends AbstractSubModule implements DataProviderInterfac /** * Identifier for this Sub-module, * for example "preview" or "cache" - * - * @return string */ public function getIdentifier(): string { @@ -46,8 +44,6 @@ class QueryInformation extends AbstractSubModule implements DataProviderInterfac /** * Sub-Module label - * - * @return string */ public function getLabel(): string { @@ -56,11 +52,6 @@ class QueryInformation extends AbstractSubModule implements DataProviderInterfac ); } - /** - * @param ServerRequestInterface $request - * @return \TYPO3\CMS\Adminpanel\ModuleApi\ModuleData - * @throws \Doctrine\DBAL\Exception - */ public function getDataToStore(ServerRequestInterface $request): ModuleData { $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class); @@ -76,10 +67,6 @@ class QueryInformation extends AbstractSubModule implements DataProviderInterfac return new ModuleData($data); } - /** - * @param \TYPO3\CMS\Adminpanel\ModuleApi\ModuleData $data - * @return string Returns content of admin panel - */ public function getContent(ModuleData $data): string { $view = new StandaloneView(); @@ -92,10 +79,6 @@ class QueryInformation extends AbstractSubModule implements DataProviderInterfac return $view->render(); } - /** - * @param array $queries - * @return array - */ protected function groupQueries(array $queries): array { $groupedQueries = []; diff --git a/typo3/sysext/adminpanel/Classes/Modules/Info/GeneralInformation.php b/typo3/sysext/adminpanel/Classes/Modules/Info/GeneralInformation.php index 84eae957b58e..27c2e3b546a9 100644 --- a/typo3/sysext/adminpanel/Classes/Modules/Info/GeneralInformation.php +++ b/typo3/sysext/adminpanel/Classes/Modules/Info/GeneralInformation.php @@ -69,7 +69,6 @@ class GeneralInformation extends AbstractSubModule implements DataProviderInterf /** * Creates the content for the "info" section ("module") of the Admin Panel * - * @param \TYPO3\CMS\Adminpanel\ModuleApi\ModuleData $data * @return string HTML content for the section. Consists of a string with table-rows with four columns. * @see display() */ @@ -89,8 +88,6 @@ class GeneralInformation extends AbstractSubModule implements DataProviderInterf /** * Identifier for this Sub-module, * for example "preview" or "cache" - * - * @return string */ public function getIdentifier(): string { @@ -106,9 +103,7 @@ class GeneralInformation extends AbstractSubModule implements DataProviderInterf /** * Collects images from TypoScriptFrontendController and calculates the total size. - * Returns human readable image sizes for fluid template output - * - * @return array + * Returns human-readable image sizes for fluid template output */ protected function collectImagesOnPage(): array { @@ -142,8 +137,6 @@ class GeneralInformation extends AbstractSubModule implements DataProviderInterf /** * Gets the document size from the current page in a human readable format - * - * @return string */ protected function collectDocumentSize(): string { @@ -155,25 +148,16 @@ class GeneralInformation extends AbstractSubModule implements DataProviderInterf return GeneralUtility::formatSize($documentSize); } - /** - * @return bool - */ protected function isNoCacheEnabled(): bool { return (bool)$this->getTypoScriptFrontendController()->no_cache; } - /** - * @return TypoScriptFrontendController - */ protected function getTypoScriptFrontendController(): TypoScriptFrontendController { return $GLOBALS['TSFE']; } - /** - * @return TimeTracker - */ protected function getTimeTracker(): TimeTracker { return GeneralUtility::makeInstance(TimeTracker::class); diff --git a/typo3/sysext/adminpanel/Classes/Modules/Info/UserIntInformation.php b/typo3/sysext/adminpanel/Classes/Modules/Info/UserIntInformation.php index 6839b2b9b06e..b103110b253c 100644 --- a/typo3/sysext/adminpanel/Classes/Modules/Info/UserIntInformation.php +++ b/typo3/sysext/adminpanel/Classes/Modules/Info/UserIntInformation.php @@ -66,9 +66,6 @@ class UserIntInformation extends AbstractSubModule implements DataProviderInterf return $view->render(); } - /** - * @return array - */ protected function getUserIntInfo(): array { $userIntInfo = []; diff --git a/typo3/sysext/adminpanel/Classes/Modules/InfoModule.php b/typo3/sysext/adminpanel/Classes/Modules/InfoModule.php index e598691f8343..87beec7f4854 100644 --- a/typo3/sysext/adminpanel/Classes/Modules/InfoModule.php +++ b/typo3/sysext/adminpanel/Classes/Modules/InfoModule.php @@ -52,9 +52,6 @@ class InfoModule extends AbstractModule implements ShortInfoProviderInterface ), $parseTime); } - /** - * @return TimeTracker - */ protected function getTimeTracker(): TimeTracker { return GeneralUtility::makeInstance(TimeTracker::class); diff --git a/typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php b/typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php index bcfe4a97df18..ae03bf02eb30 100644 --- a/typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php +++ b/typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php @@ -133,10 +133,6 @@ class PreviewModule extends AbstractModule implements RequestEnricherInterface, return $view->render(); } - /** - * @param string $option - * @return string - */ protected function getConfigOptionForModule(string $option): string { return $this->configurationService->getConfigurationOption( @@ -149,12 +145,6 @@ class PreviewModule extends AbstractModule implements RequestEnricherInterface, * Initialize frontend preview functionality incl. * simulation of users or time * - * @param bool $showHiddenPages - * @param bool $showHiddenRecords - * @param bool $showScheduledRecords - * @param int $simulateDate - * @param int $simulateUserGroup UID of the fe_group to simulate - * @param \Psr\Http\Message\ServerRequestInterface $request * @throws \Exception */ protected function initializeFrontendPreview( @@ -215,9 +205,6 @@ class PreviewModule extends AbstractModule implements RequestEnricherInterface, $context->setAspect('frontend.preview', $previewAspect); } - /** - * @return array - */ public function getJavaScriptFiles(): array { return ['EXT:adminpanel/Resources/Public/JavaScript/modules/preview.js']; @@ -228,9 +215,6 @@ class PreviewModule extends AbstractModule implements RequestEnricherInterface, * * Simulation date is either set via configuration of AdminPanel (Date and Time Fields) or via ADMCMD_ $_GET * parameter from backend previews - * - * @param int $simulateDate - * @return int */ protected function parseDate(int $simulateDate): ?int { @@ -253,8 +237,6 @@ class PreviewModule extends AbstractModule implements RequestEnricherInterface, /** * Returns a string array with css files that will be rendered after the module - * - * @return array */ public function getCssFiles(): array { diff --git a/typo3/sysext/adminpanel/Classes/Modules/TsDebug/TypoScriptWaterfall.php b/typo3/sysext/adminpanel/Classes/Modules/TsDebug/TypoScriptWaterfall.php index edccdb78377d..3608c3d2b53c 100644 --- a/typo3/sysext/adminpanel/Classes/Modules/TsDebug/TypoScriptWaterfall.php +++ b/typo3/sysext/adminpanel/Classes/Modules/TsDebug/TypoScriptWaterfall.php @@ -36,10 +36,7 @@ use TYPO3\CMS\Fluid\View\StandaloneView; */ class TypoScriptWaterfall extends AbstractSubModule implements RequestEnricherInterface, ModuleSettingsProviderInterface { - /** - * @var ConfigurationService - */ - protected $configurationService; + protected ConfigurationService $configurationService; public function __construct() { @@ -70,9 +67,6 @@ class TypoScriptWaterfall extends AbstractSubModule implements RequestEnricherIn /** * Creates the content for the "tsdebug" section ("module") of the Admin Panel - * - * @param ModuleData $data - * @return string HTML */ public function getContent(ModuleData $data): string { @@ -123,10 +117,6 @@ class TypoScriptWaterfall extends AbstractSubModule implements RequestEnricherIn return $view->render(); } - /** - * @param string $option - * @return bool - */ protected function getConfigurationOption(string $option): bool { return (bool)$this->configurationService->getConfigurationOption('tsdebug', $option); @@ -134,8 +124,6 @@ class TypoScriptWaterfall extends AbstractSubModule implements RequestEnricherIn /** * Renders the TypoScript log as string - * - * @return string */ protected function renderTypoScriptLog(): string { @@ -153,9 +141,6 @@ class TypoScriptWaterfall extends AbstractSubModule implements RequestEnricherIn return $timeTracker->printTSlog(); } - /** - * @return TimeTracker - */ protected function getTimeTracker(): TimeTracker { return GeneralUtility::makeInstance(TimeTracker::class); diff --git a/typo3/sysext/adminpanel/Classes/Modules/TsDebugModule.php b/typo3/sysext/adminpanel/Classes/Modules/TsDebugModule.php index 03b404e898a1..9cfea663a882 100644 --- a/typo3/sysext/adminpanel/Classes/Modules/TsDebugModule.php +++ b/typo3/sysext/adminpanel/Classes/Modules/TsDebugModule.php @@ -58,9 +58,6 @@ class TsDebugModule extends AbstractModule implements ShortInfoProviderInterface ); } - /** - * @return TimeTracker - */ protected function getTimeTracker(): TimeTracker { return GeneralUtility::makeInstance(TimeTracker::class); diff --git a/typo3/sysext/adminpanel/Classes/Repositories/FrontendGroupsRepository.php b/typo3/sysext/adminpanel/Classes/Repositories/FrontendGroupsRepository.php index f70fd1978a0f..4fbe8be5b2d1 100644 --- a/typo3/sysext/adminpanel/Classes/Repositories/FrontendGroupsRepository.php +++ b/typo3/sysext/adminpanel/Classes/Repositories/FrontendGroupsRepository.php @@ -31,8 +31,6 @@ class FrontendGroupsRepository { /** * returns an array of all available frontend user groups including hidden ones. - * - * @return array */ public function getAvailableFrontendUserGroups(): array { @@ -48,9 +46,6 @@ class FrontendGroupsRepository /** * fetches the amount of user groups - * - * @param FrontendBackendUserAuthentication $beUser - * @return int */ protected function getUserGroupOptionCountByBackendUser(FrontendBackendUserAuthentication $beUser): int { @@ -76,9 +71,6 @@ class FrontendGroupsRepository /** * fetches all frontend user groups, except deleted, for pages - * - * @param FrontendBackendUserAuthentication $beUser - * @return array */ protected function getUserGroupsForPagesByBackendUser(FrontendBackendUserAuthentication $beUser): array { diff --git a/typo3/sysext/adminpanel/Classes/Service/ConfigurationService.php b/typo3/sysext/adminpanel/Classes/Service/ConfigurationService.php index d15f8dbc4ca0..b36200cc4b54 100644 --- a/typo3/sysext/adminpanel/Classes/Service/ConfigurationService.php +++ b/typo3/sysext/adminpanel/Classes/Service/ConfigurationService.php @@ -19,6 +19,7 @@ namespace TYPO3\CMS\Adminpanel\Service; use Psr\Http\Message\ServerRequestInterface; use TYPO3\CMS\Adminpanel\ModuleApi\ConfigurableInterface; +use TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface; use TYPO3\CMS\Adminpanel\ModuleApi\OnSubmitActorInterface; use TYPO3\CMS\Adminpanel\ModuleApi\SubmoduleProviderInterface; use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; @@ -31,10 +32,7 @@ use TYPO3\CMS\Core\SingletonInterface; */ class ConfigurationService implements SingletonInterface { - /** - * @var array - */ - protected $mainConfiguration; + protected array $mainConfiguration; public function __construct() { @@ -43,8 +41,6 @@ class ConfigurationService implements SingletonInterface /** * Get MainConfiguration (User TSConfig admPanel) - * - * @return array */ public function getMainConfiguration(): array { @@ -54,10 +50,6 @@ class ConfigurationService implements SingletonInterface /** * Helper method to return configuration options * Checks User TSConfig overrides and current backend user session - * - * @param string $identifier - * @param string $option - * @return string */ public function getConfigurationOption(string $identifier, string $option): string { @@ -79,8 +71,7 @@ class ConfigurationService implements SingletonInterface * triggers onSubmit method of modules to enable each module * to enhance the save action * - * @param \TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface[] $modules - * @param ServerRequestInterface $request + * @param ModuleInterface[] $modules */ public function saveConfiguration(array $modules, ServerRequestInterface $request): void { @@ -104,8 +95,6 @@ class ConfigurationService implements SingletonInterface } /** - * @param array $modules - * @param \Psr\Http\Message\ServerRequestInterface $request * @param array $configurationToSave */ protected function triggerOnSubmitActors( diff --git a/typo3/sysext/adminpanel/Classes/Utility/MemoryUtility.php b/typo3/sysext/adminpanel/Classes/Utility/MemoryUtility.php index 7bb2bb870ee4..03fb759703ee 100644 --- a/typo3/sysext/adminpanel/Classes/Utility/MemoryUtility.php +++ b/typo3/sysext/adminpanel/Classes/Utility/MemoryUtility.php @@ -33,8 +33,6 @@ class MemoryUtility * but should prevent memory exhaustion due to the admin panel in most cases. * The loggers will stop logging once the amount of free memory falls below the threshold (see * MINIMAL_PERCENT_OF_FREE_MEMORY const). - * - * @return bool */ public static function isMemoryConsumptionTooHigh(): bool { diff --git a/typo3/sysext/adminpanel/Classes/Utility/ResourceUtility.php b/typo3/sysext/adminpanel/Classes/Utility/ResourceUtility.php index 00c868183285..b5267bab4535 100644 --- a/typo3/sysext/adminpanel/Classes/Utility/ResourceUtility.php +++ b/typo3/sysext/adminpanel/Classes/Utility/ResourceUtility.php @@ -17,6 +17,7 @@ declare(strict_types=1); namespace TYPO3\CMS\Adminpanel\Utility; +use TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface; use TYPO3\CMS\Adminpanel\ModuleApi\ResourceProviderInterface; use TYPO3\CMS\Adminpanel\ModuleApi\SubmoduleProviderInterface; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -28,7 +29,7 @@ class ResourceUtility * Get additional resources (css, js) from modules and merge it to * one array - returns an array of full html tags * - * @param \TYPO3\CMS\Adminpanel\ModuleApi\ModuleInterface[] $modules + * @param ModuleInterface[] $modules * @return array{js: string, css: string} */ public static function getAdditionalResourcesForModules(array $modules): array @@ -73,8 +74,6 @@ class ResourceUtility /** * Returns a link tag with the admin panel stylesheet * defined using TBE_STYLES - * - * @return string */ protected static function getAdminPanelStylesheet(): string { @@ -89,9 +88,6 @@ class ResourceUtility /** * Get a css tag for file - with absolute web path resolving - * - * @param string $cssFileLocation - * @return string */ protected static function getCssTag(string $cssFileLocation): string { @@ -106,9 +102,6 @@ class ResourceUtility /** * Get a script tag for JavaScript with absolute paths - * - * @param string $jsFileLocation - * @return string */ protected static function getJsTag(string $jsFileLocation): string { @@ -123,8 +116,6 @@ class ResourceUtility /** * Return a string with tags for main admin panel resources - * - * @return array */ public static function getResources(): array { diff --git a/typo3/sysext/adminpanel/Classes/Utility/StateUtility.php b/typo3/sysext/adminpanel/Classes/Utility/StateUtility.php index 404258ea3ac6..09c51d6a4161 100644 --- a/typo3/sysext/adminpanel/Classes/Utility/StateUtility.php +++ b/typo3/sysext/adminpanel/Classes/Utility/StateUtility.php @@ -28,8 +28,6 @@ class StateUtility { /** * Checks if adminPanel was configured to be shown - * - * @return bool */ public static function isActivatedForUser(): bool { @@ -47,8 +45,6 @@ class StateUtility /** * Returns true if admin panel was activated * (switched "on" via GUI) - * - * @return bool */ public static function isOpen(): bool { diff --git a/typo3/sysext/adminpanel/Classes/ViewHelpers/SubModuleRenderViewHelper.php b/typo3/sysext/adminpanel/Classes/ViewHelpers/SubModuleRenderViewHelper.php index 8d62c5fd58dd..a74504e62384 100644 --- a/typo3/sysext/adminpanel/Classes/ViewHelpers/SubModuleRenderViewHelper.php +++ b/typo3/sysext/adminpanel/Classes/ViewHelpers/SubModuleRenderViewHelper.php @@ -35,12 +35,7 @@ final class SubModuleRenderViewHelper extends AbstractViewHelper public function initializeArguments(): void { - $this->registerArgument( - 'module', - ContentProviderInterface::class, - 'SubModule instance to be rendered', - true - ); + $this->registerArgument('module', ContentProviderInterface::class, 'SubModule instance to be rendered', true); $this->registerArgument('data', ModuleDataStorageCollection::class, 'Data to be used for rendering', true); } -- GitLab