Commit eaefddb7 authored by Christian Kuhn's avatar Christian Kuhn Committed by Georg Ringer
Browse files

[TASK] Avoid @inheritdoc annotations

The @inheritdoc annotation is essentially useless
since it adds no value to code readers especially
in more and more strict environments. Static
code analyzers use doc header annotations from
parent classes or interfaces anyways.

The patch removes all @inheritdoc annotations
throughout the core and removes @inheritdoc from
the 'allowed annotation' list in CI.

Relsolves: #96930
Releases: main
Change-Id: I33fcc837eb6b7c8c8c34a33d28aa2911070c6b6f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/73565

Tested-by: Jochen's avatarJochen <rothjochen@gmail.com>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Jochen's avatarJochen <rothjochen@gmail.com>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
parent fc5a06e7
......@@ -53,7 +53,7 @@ class NodeVisitor extends NodeVisitorAbstract
// Widely used tags (but not existent in phpdoc)
'fix', 'fixme', 'override',
// PHPDocumentor 1 tags
'abstract', 'code', 'deprec', 'endcode', 'exception', 'final', 'ingroup', 'inheritdoc', 'inheritDoc', 'magic', 'name', 'toc', 'tutorial', 'private', 'static', 'staticvar', 'staticVar', 'throw',
'abstract', 'code', 'deprec', 'endcode', 'exception', 'final', 'ingroup', 'magic', 'name', 'toc', 'tutorial', 'private', 'static', 'staticvar', 'staticVar', 'throw',
// PHPDocumentor 2 tags
'api', 'author', 'category', 'copyright', 'deprecated', 'example', 'filesource', 'global', 'ignore', 'internal', 'license', 'link', 'method', 'package', 'param', 'property', 'property-read', 'property-write', 'return', 'see', 'since', 'source', 'subpackage', 'throws', 'todo', 'TODO', 'usedby', 'uses', 'var', 'version',
// PHPUnit tags
......
......@@ -71,25 +71,16 @@ abstract class AbstractModule implements ModuleInterface, ConfigurableInterface,
return $result;
}
/**
* @inheritdoc
*/
public function setSubModules(array $subModules): void
{
$this->subModules = $subModules;
}
/**
* @inheritdoc
*/
public function getSubModules(): array
{
return $this->subModules;
}
/**
* @inheritdoc
*/
public function hasSubmoduleSettings(): bool
{
$hasSettings = false;
......
......@@ -75,26 +75,17 @@ class CacheModule extends AbstractModule implements PageSettingsProviderInterfac
return $view->render();
}
/**
* @inheritdoc
*/
public function getIdentifier(): string
{
return 'cache';
}
/**
* @inheritdoc
*/
public function getLabel(): string
{
$locallangFileAndPath = 'LLL:EXT:adminpanel/Resources/Private/Language/locallang_cache.xlf:module.label';
return $this->getLanguageService()->sL($locallangFileAndPath);
}
/**
* @inheritdoc
*/
public function enrich(ServerRequestInterface $request): ServerRequestInterface
{
if ($this->configurationService->getConfigurationOption('cache', 'noCache')) {
......
......@@ -72,9 +72,6 @@ class Log extends AbstractSubModule implements DataProviderInterface, ModuleSett
);
}
/**
* @inheritdoc
*/
public function getDataToStore(ServerRequestInterface $request): ModuleData
{
$maxLevel = LogLevel::normalizeLevel(LogLevel::DEBUG);
......@@ -104,9 +101,6 @@ class Log extends AbstractSubModule implements DataProviderInterface, ModuleSett
);
}
/**
* @inheritdoc
*/
public function getSettings(): string
{
$view = GeneralUtility::makeInstance(StandaloneView::class);
......@@ -176,9 +170,6 @@ class Log extends AbstractSubModule implements DataProviderInterface, ModuleSett
return $view->render();
}
/**
* @inheritdoc
*/
public function enrich(ServerRequestInterface $request): ServerRequestInterface
{
$this->logLevel = (int)$this->getConfigOption('startLevel');
......
......@@ -28,26 +28,16 @@ use TYPO3\CMS\Core\Log\LogRecord;
*/
class DebugModule extends AbstractModule implements ShortInfoProviderInterface
{
/**
* @inheritdoc
*/
public function getIdentifier(): string
{
return 'debug';
}
/**
* @inheritdoc
*/
public function getIconIdentifier(): string
{
return 'actions-debug';
}
/**
* @inheritdoc
*/
public function getLabel(): string
{
return $this->getLanguageService()->sL(
......
......@@ -37,9 +37,6 @@ use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
*/
class GeneralInformation extends AbstractSubModule implements DataProviderInterface
{
/**
* @inheritdoc
*/
public function getDataToStore(ServerRequestInterface $request): ModuleData
{
/** @var UserAspect $frontendUserAspect */
......@@ -100,9 +97,6 @@ class GeneralInformation extends AbstractSubModule implements DataProviderInterf
return 'info_general';
}
/**
* @inheritdoc
*/
public function getLabel(): string
{
return $this->getLanguageService()->sL(
......
......@@ -31,17 +31,11 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
*/
class PhpInformation extends AbstractSubModule implements DataProviderInterface
{
/**
* @inheritdoc
*/
public function getIdentifier(): string
{
return 'info_php';
}
/**
* @inheritdoc
*/
public function getLabel(): string
{
return $this->getLanguageService()->sL(
......@@ -49,9 +43,6 @@ class PhpInformation extends AbstractSubModule implements DataProviderInterface
);
}
/**
* @inheritdoc
*/
public function getDataToStore(ServerRequestInterface $request): ModuleData
{
return new ModuleData(
......@@ -68,9 +59,6 @@ class PhpInformation extends AbstractSubModule implements DataProviderInterface
);
}
/**
* @inheritdoc
*/
public function getContent(ModuleData $data): string
{
$view = GeneralUtility::makeInstance(StandaloneView::class);
......
......@@ -31,17 +31,11 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
*/
class RequestInformation extends AbstractSubModule implements DataProviderInterface
{
/**
* @inheritdoc
*/
public function getIdentifier(): string
{
return 'info-request';
}
/**
* @inheritdoc
*/
public function getLabel(): string
{
return $this->getLanguageService()->sL(
......@@ -49,9 +43,6 @@ class RequestInformation extends AbstractSubModule implements DataProviderInterf
);
}
/**
* @inheritdoc
*/
public function getDataToStore(ServerRequestInterface $request): ModuleData
{
return new ModuleData(
......@@ -65,9 +56,6 @@ class RequestInformation extends AbstractSubModule implements DataProviderInterf
);
}
/**
* @inheritdoc
*/
public function getContent(ModuleData $data): string
{
$view = GeneralUtility::makeInstance(StandaloneView::class);
......
......@@ -32,17 +32,11 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
*/
class UserIntInformation extends AbstractSubModule implements DataProviderInterface
{
/**
* @inheritdoc
*/
public function getIdentifier(): string
{
return 'info_userint';
}
/**
* @inheritdoc
*/
public function getLabel(): string
{
return $this->getLanguageService()->sL(
......@@ -50,9 +44,6 @@ class UserIntInformation extends AbstractSubModule implements DataProviderInterf
);
}
/**
* @inheritdoc
*/
public function getDataToStore(ServerRequestInterface $request): ModuleData
{
return new ModuleData(
......@@ -62,9 +53,6 @@ class UserIntInformation extends AbstractSubModule implements DataProviderInterf
);
}
/**
* @inheritdoc
*/
public function getContent(ModuleData $data): string
{
$view = GeneralUtility::makeInstance(StandaloneView::class);
......
......@@ -27,25 +27,16 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class InfoModule extends AbstractModule implements ShortInfoProviderInterface
{
/**
* @inheritdoc
*/
public function getIconIdentifier(): string
{
return 'actions-document-info';
}
/**
* @inheritdoc
*/
public function getIdentifier(): string
{
return 'info';
}
/**
* @inheritdoc
*/
public function getLabel(): string
{
return $this->getLanguageService()->sL(
......@@ -53,9 +44,6 @@ class InfoModule extends AbstractModule implements ShortInfoProviderInterface
);
}
/**
* @inheritdoc
*/
public function getShortInfo(): string
{
$parseTime = $this->getTimeTracker()->getParseTime();
......
......@@ -49,17 +49,11 @@ class PreviewModule extends AbstractModule implements RequestEnricherInterface,
return 'actions-preview';
}
/**
* @inheritdoc
*/
public function getIdentifier(): string
{
return 'preview';
}
/**
* @inheritdoc
*/
public function getLabel(): string
{
return $this->getLanguageService()->sL(
......@@ -67,9 +61,6 @@ class PreviewModule extends AbstractModule implements RequestEnricherInterface,
);
}
/**
* @inheritdoc
*/
public function enrich(ServerRequestInterface $request): ServerRequestInterface
{
// Backend preview params (ADMCMD_) take precedence over configured admin panel values
......@@ -98,9 +89,6 @@ class PreviewModule extends AbstractModule implements RequestEnricherInterface,
return $request;
}
/**
* @inheritdoc
*/
public function getPageSettings(): string
{
$view = GeneralUtility::makeInstance(StandaloneView::class);
......
......@@ -46,17 +46,11 @@ class TypoScriptWaterfall extends AbstractSubModule implements RequestEnricherIn
$this->configurationService = GeneralUtility::makeInstance(ConfigurationService::class);
}
/**
* @inheritdoc
*/
public function getIdentifier(): string
{
return 'typoscript-waterfall';
}
/**
* @inheritdoc
*/
public function getLabel(): string
{
return $this->getLanguageService()->sL(
......@@ -64,9 +58,6 @@ class TypoScriptWaterfall extends AbstractSubModule implements RequestEnricherIn
);
}
/**
* @inheritdoc
*/
public function enrich(ServerRequestInterface $request): ServerRequestInterface
{
if ($this->getConfigurationOption('forceTemplateParsing')) {
......@@ -108,9 +99,6 @@ class TypoScriptWaterfall extends AbstractSubModule implements RequestEnricherIn
return $view->render();
}
/**
* @inheritdoc
*/
public function getSettings(): string
{
$view = GeneralUtility::makeInstance(StandaloneView::class);
......
......@@ -27,25 +27,16 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*/
class TsDebugModule extends AbstractModule implements ShortInfoProviderInterface
{
/**
* @inheritdoc
*/
public function getIdentifier(): string
{
return 'tsdebug';
}
/**
* @inheritdoc
*/
public function getIconIdentifier(): string
{
return 'mimetypes-x-content-template-static';
}
/**
* @inheritdoc
*/
public function getLabel(): string
{
return $this->getLanguageService()->sL(
......@@ -53,9 +44,6 @@ class TsDebugModule extends AbstractModule implements ShortInfoProviderInterface
);
}
/**
* @inheritdoc
*/
public function getShortInfo(): string
{
$messageCount = 0;
......
......@@ -32,9 +32,6 @@ class EventDispatcher extends \TYPO3\CMS\Core\EventDispatcher\EventDispatcher
return $this->dispatchedEvents;
}
/**
* @inheritdoc
*/
public function dispatch(object $event)
{
$this->dispatchedEvents[] = $event;
......
......@@ -152,9 +152,6 @@ class MainModuleFixture implements
return [];
}
/**
* @inheritdoc
*/
public function hasSubmoduleSettings(): bool
{
return false;
......
......@@ -72,8 +72,6 @@ class ResetPasswordCommand extends Command
}
/**
* Executes the command for sending out an email to reset the password.
*
* @inheritDoc
*/
protected function execute(InputInterface $input, OutputInterface $output): int
{
......
......@@ -45,8 +45,6 @@ class DumpAutoloadCommand extends Command
/**
* This command is not needed in composer mode.
*
* @inheritdoc
*/
public function isEnabled()
{
......@@ -55,8 +53,6 @@ class DumpAutoloadCommand extends Command
/**
* Dumps the class loading information
*
* @inheritdoc
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
......
......@@ -66,8 +66,6 @@ class ExtensionListCommand extends Command
/**
* Shows the list of all extensions
*
* @inheritdoc
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
......
......@@ -42,8 +42,6 @@ class SiteListCommand extends Command
/**
* Shows a table with all configured sites
*
* @inheritdoc
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
......
......@@ -55,8 +55,6 @@ class SiteShowCommand extends Command
/**
* Shows the configuration of a site
*
* @inheritdoc
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment