diff --git a/phpstan.neon b/phpstan.neon index d6d5f6a76a1d..db340ba89c6d 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,6 +3,15 @@ includes: # Include bleeding edge rules if necessary but do not commit # - vendor/phpstan/phpstan/conf/bleedingEdge.neon +rules: + # those are level 2 rules, will be removed once level 2 is completely active + - PHPStan\Rules\PhpDoc\IncompatiblePhpDocTypeRule + - PHPStan\Rules\PhpDoc\IncompatiblePropertyPhpDocTypeRule + - PHPStan\Rules\PhpDoc\InvalidPhpDocTagValueRule + - PHPStan\Rules\PhpDoc\InvalidPHPStanDocTagRule + - PHPStan\Rules\PhpDoc\InvalidThrowsPhpDocValueRule + - PHPStan\Rules\PhpDoc\WrongVariableNameInVarTagRule + parameters: level: 1 diff --git a/typo3/sysext/adminpanel/Classes/Service/ConfigurationService.php b/typo3/sysext/adminpanel/Classes/Service/ConfigurationService.php index e48208c61878..df077def990d 100644 --- a/typo3/sysext/adminpanel/Classes/Service/ConfigurationService.php +++ b/typo3/sysext/adminpanel/Classes/Service/ConfigurationService.php @@ -111,7 +111,7 @@ protected function getBackendUser(): BackendUserAuthentication /** * @param array $modules * @param \Psr\Http\Message\ServerRequestInterface $request - * @param $configurationToSave + * @param array $configurationToSave */ protected function triggerOnSubmitActors( array $modules, diff --git a/typo3/sysext/backend/Classes/Authentication/PasswordReset.php b/typo3/sysext/backend/Classes/Authentication/PasswordReset.php index a6b2b1490b2c..58e98544de3d 100644 --- a/typo3/sysext/backend/Classes/Authentication/PasswordReset.php +++ b/typo3/sysext/backend/Classes/Authentication/PasswordReset.php @@ -407,7 +407,7 @@ protected function getHasher(): PasswordHashInterface * @param int $error see SystemLogErrorClassification * @param int $userId * @param array $data additional information, used for the message - * @param $ipAddress + * @param string $ipAddress * @param Context $context */ protected function log(string $message, int $action, int $error, int $userId, array $data, $ipAddress, Context $context): void diff --git a/typo3/sysext/backend/Classes/Controller/BackendController.php b/typo3/sysext/backend/Classes/Controller/BackendController.php index 89c45d36bdf7..feb87cd126eb 100644 --- a/typo3/sysext/backend/Classes/Controller/BackendController.php +++ b/typo3/sysext/backend/Classes/Controller/BackendController.php @@ -179,7 +179,7 @@ protected function initializeToolbarItems() /** * Main function generating the BE scaffolding * - * @param $request ServerRequestInterface + * @param ServerRequestInterface $request * @return ResponseInterface the response with the content */ public function mainAction(ServerRequestInterface $request): ResponseInterface diff --git a/typo3/sysext/backend/Classes/Controller/PageLayoutController.php b/typo3/sysext/backend/Classes/Controller/PageLayoutController.php index 5cff6102b605..4f7b669b2cc5 100644 --- a/typo3/sysext/backend/Classes/Controller/PageLayoutController.php +++ b/typo3/sysext/backend/Classes/Controller/PageLayoutController.php @@ -970,7 +970,7 @@ protected function getNumberOfHiddenElements(array $languageColumns): int /** * Check if page can be edited by current user * - * @param int|null $languageId + * @param int $languageId * @return bool */ protected function isPageEditable(int $languageId): bool diff --git a/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php b/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php index 8f26b9cd315e..eba7998d9bc2 100644 --- a/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php +++ b/typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php @@ -335,7 +335,7 @@ protected function checkBoxParams($itemName, $formElementValue, $checkbox, $chec * Calculates the bootstrap grid classes based on the amount of columns * defined in the checkbox item TCA * - * @param $cols + * @param int $cols * @return array * @internal */ diff --git a/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaCheckboxItems.php b/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaCheckboxItems.php index 3b2a93c4546f..c434cdaa3431 100644 --- a/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaCheckboxItems.php +++ b/typo3/sysext/backend/Classes/Form/FormDataProvider/TcaCheckboxItems.php @@ -99,7 +99,7 @@ private function sanitizeConfiguration(array $config, string $fieldName, string /** * @param string $fieldName * @param string $tableName - * @param $checkboxEntry + * @param mixed $checkboxEntry * @param int $checkboxKey * @throws \UnexpectedValueException */ diff --git a/typo3/sysext/backend/Classes/Template/ModuleTemplate.php b/typo3/sysext/backend/Classes/Template/ModuleTemplate.php index 90242c955080..ae77ec8caaee 100644 --- a/typo3/sysext/backend/Classes/Template/ModuleTemplate.php +++ b/typo3/sysext/backend/Classes/Template/ModuleTemplate.php @@ -429,7 +429,7 @@ public function setModuleName($moduleName): self /** * Generates the Menu for things like Web->Info * - * @param $moduleMenuIdentifier + * @param string $moduleMenuIdentifier * @return self */ public function registerModuleMenu($moduleMenuIdentifier): self diff --git a/typo3/sysext/core/Classes/Authentication/AuthenticationService.php b/typo3/sysext/core/Classes/Authentication/AuthenticationService.php index e789e8118282..e0de35c4e0f7 100644 --- a/typo3/sysext/core/Classes/Authentication/AuthenticationService.php +++ b/typo3/sysext/core/Classes/Authentication/AuthenticationService.php @@ -352,7 +352,7 @@ protected function updatePasswordHashInDatabase(string $table, int $uid, string * parameters. The syntax is the same as for sprintf() * * @param string $message Message to output - * @param array|mixed[] $params + * @param array $params */ protected function writeLogMessage(string $message, ...$params): void { diff --git a/typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php b/typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php index 065207eb09f7..c7c2d0e22bb1 100644 --- a/typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php +++ b/typo3/sysext/core/Classes/Cache/Backend/Typo3DatabaseBackend.php @@ -481,7 +481,7 @@ public function setCompression($compression) * If compression is enabled and this is not set, * gzcompress default level will be used * - * @param int -1 to 9: Compression level + * @param int $compressionLevel -1 to 9: Compression level */ public function setCompressionLevel($compressionLevel) { diff --git a/typo3/sysext/core/Classes/Collection/AbstractRecordCollection.php b/typo3/sysext/core/Classes/Collection/AbstractRecordCollection.php index 62e62e84bf0b..d8faa1384c37 100644 --- a/typo3/sysext/core/Classes/Collection/AbstractRecordCollection.php +++ b/typo3/sysext/core/Classes/Collection/AbstractRecordCollection.php @@ -264,7 +264,7 @@ public function setItemTableName($tableName) * The comparison function given as must return an integer less than, equal to, or greater than * zero if the first argument is considered to be respectively less than, equal to, or greater than the second. * - * @param $callbackFunction + * @param callable $callbackFunction * @see http://www.php.net/manual/en/function.usort.php */ public function usort($callbackFunction) diff --git a/typo3/sysext/core/Classes/Collection/SortableCollectionInterface.php b/typo3/sysext/core/Classes/Collection/SortableCollectionInterface.php index f81be9b2f3d5..bef7f9d1c848 100644 --- a/typo3/sysext/core/Classes/Collection/SortableCollectionInterface.php +++ b/typo3/sysext/core/Classes/Collection/SortableCollectionInterface.php @@ -31,7 +31,7 @@ interface SortableCollectionInterface * The comparison function given as must return an integer less than, equal to, or greater than * zero if the first argument is considered to be respectively less than, equal to, or greater than the second. * - * @param $callbackFunction + * @param callable $callbackFunction * @see http://www.php.net/manual/en/function.usort.php */ public function usort($callbackFunction); diff --git a/typo3/sysext/core/Classes/Context/Context.php b/typo3/sysext/core/Classes/Context/Context.php index 95be43dd51e3..8ef0a3d1f55d 100644 --- a/typo3/sysext/core/Classes/Context/Context.php +++ b/typo3/sysext/core/Classes/Context/Context.php @@ -57,7 +57,7 @@ class Context implements SingletonInterface /** * Sets up the context with pre-defined aspects * - * @param array|null $defaultAspects + * @param array $defaultAspects */ public function __construct(array $defaultAspects = []) { diff --git a/typo3/sysext/core/Classes/Core/Bootstrap.php b/typo3/sysext/core/Classes/Core/Bootstrap.php index a2f13f9393d5..e114f6b08b01 100644 --- a/typo3/sysext/core/Classes/Core/Bootstrap.php +++ b/typo3/sysext/core/Classes/Core/Bootstrap.php @@ -607,7 +607,7 @@ public static function initializeBackendAuthentication($proceedIfNoUserIsLoggedI */ public static function initializeLanguageObject() { - /** @var $GLOBALS['LANG'] \TYPO3\CMS\Core\Localization\LanguageService */ + /** @var \TYPO3\CMS\Core\Localization\LanguageService $GLOBALS['LANG'] */ $GLOBALS['LANG'] = LanguageService::createFromUserPreferences($GLOBALS['BE_USER']); } } diff --git a/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php b/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php index df27ff4b58b5..a7df9161af7c 100644 --- a/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php +++ b/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php @@ -411,7 +411,7 @@ protected static function setRequestType(int $requestType) /** * Define constants and variables * - * @param string + * @param string $mode */ protected static function defineLegacyConstants(string $mode) { diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php index 47bcd1b85216..fd3864275ab3 100644 --- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php +++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php @@ -2407,7 +2407,7 @@ public function getUnique($table, $field, $value, $id, $newPid = 0) * @param string $field Field name for which $value must be unique * @param int $uid UID to filter out in the lookup (the record itself...) * @param int $pid If set, the value will be unique for this PID - * @return \Doctrine\DBAL\Driver\Statement|int Return the prepared statement to check uniqueness + * @return \Doctrine\DBAL\Driver\Statement Return the prepared statement to check uniqueness */ protected function getUniqueCountStatement( string $value, @@ -7601,7 +7601,6 @@ protected function fixUniqueInSite(string $table, int $uid): bool /** * Check if there are subpages that need an adoption as well * @param int $pageId - * @param int $pid */ protected function fixUniqueInSiteForSubpages(int $pageId) { diff --git a/typo3/sysext/core/Classes/DataHandling/History/RecordHistoryStore.php b/typo3/sysext/core/Classes/DataHandling/History/RecordHistoryStore.php index 62350c4b5331..0732e247b606 100644 --- a/typo3/sysext/core/Classes/DataHandling/History/RecordHistoryStore.php +++ b/typo3/sysext/core/Classes/DataHandling/History/RecordHistoryStore.php @@ -82,7 +82,7 @@ public function __construct(string $userType = self::USER_BACKEND, int $userId = * @param string $table * @param int $uid * @param array $payload - * @param string|null $correlationId + * @param CorrelationId|null $correlationId * @return string */ public function addRecord(string $table, int $uid, array $payload, CorrelationId $correlationId = null): string @@ -107,7 +107,7 @@ public function addRecord(string $table, int $uid, array $payload, CorrelationId * @param string $table * @param int $uid * @param array $payload - * @param string|null $correlationId + * @param CorrelationId|null $correlationId * @return string */ public function modifyRecord(string $table, int $uid, array $payload, CorrelationId $correlationId = null): string @@ -131,7 +131,7 @@ public function modifyRecord(string $table, int $uid, array $payload, Correlatio /** * @param string $table * @param int $uid - * @param string|null $correlationId + * @param CorrelationId|null $correlationId * @return string */ public function deleteRecord(string $table, int $uid, CorrelationId $correlationId = null): string @@ -154,7 +154,7 @@ public function deleteRecord(string $table, int $uid, CorrelationId $correlation /** * @param string $table * @param int $uid - * @param string|null $correlationId + * @param CorrelationId|null $correlationId * @return string */ public function undeleteRecord(string $table, int $uid, CorrelationId $correlationId = null): string @@ -178,7 +178,7 @@ public function undeleteRecord(string $table, int $uid, CorrelationId $correlati * @param string $table * @param int $uid * @param array $payload - * @param string|null $correlationId + * @param CorrelationId|null $correlationId * @return string */ public function moveRecord(string $table, int $uid, array $payload, CorrelationId $correlationId = null): string diff --git a/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php b/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php index 89d06f48e2ec..a3bd23a69ae6 100644 --- a/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php +++ b/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php @@ -1317,7 +1317,7 @@ protected function applyLocalizationReferences(string $tableName, $fromId, int $ * Prefixes language title if applicable for the accordant field name in raw data-map item. * * @param string $tableName - * @param $fromId + * @param string|int $fromId * @param int $language * @param array $data * @return array diff --git a/typo3/sysext/core/Classes/DataHandling/Model/RecordStateFactory.php b/typo3/sysext/core/Classes/DataHandling/Model/RecordStateFactory.php index ca2c295ecc38..dbe2a60dd8ec 100644 --- a/typo3/sysext/core/Classes/DataHandling/Model/RecordStateFactory.php +++ b/typo3/sysext/core/Classes/DataHandling/Model/RecordStateFactory.php @@ -52,7 +52,7 @@ public function __construct(string $name) * @param array $data * @param int|string|null $pageId * @param int|string|null $recordId - * @return object|RecordState + * @return RecordState */ public function fromArray(array $data, $pageId = null, $recordId = null): RecordState { diff --git a/typo3/sysext/core/Classes/Database/Query/Expression/ExpressionBuilder.php b/typo3/sysext/core/Classes/Database/Query/Expression/ExpressionBuilder.php index 5e7bbe061515..fb5e54a3ca44 100644 --- a/typo3/sysext/core/Classes/Database/Query/Expression/ExpressionBuilder.php +++ b/typo3/sysext/core/Classes/Database/Query/Expression/ExpressionBuilder.php @@ -62,7 +62,7 @@ public function __construct(Connection $connection) /** * Creates a conjunction of the given boolean expressions * - * @param mixed $expressions Optional clause. Requires at least one defined when converting to string. + * @param array $expressions Optional clause. Requires at least one defined when converting to string. * * @return CompositeExpression */ @@ -74,7 +74,7 @@ public function andX(...$expressions): CompositeExpression /** * Creates a disjunction of the given boolean expressions. * - * @param mixed $expressions Optional clause. Requires at least one defined when converting to string. + * @param array $expressions Optional clause. Requires at least one defined when converting to string. * * @return CompositeExpression */ diff --git a/typo3/sysext/core/Classes/Database/Query/QueryBuilder.php b/typo3/sysext/core/Classes/Database/Query/QueryBuilder.php index bf6fc35865a2..4eb7153797ed 100644 --- a/typo3/sysext/core/Classes/Database/Query/QueryBuilder.php +++ b/typo3/sysext/core/Classes/Database/Query/QueryBuilder.php @@ -384,7 +384,7 @@ public function count(string $item): QueryBuilder * Specifies items that are to be returned in the query result. * Replaces any previously specified selections, if any. * - * @param string[] $selects + * @param array $selects * @return QueryBuilder This QueryBuilder instance. */ public function select(string ...$selects): QueryBuilder @@ -397,7 +397,7 @@ public function select(string ...$selects): QueryBuilder /** * Adds an item that is to be returned in the query result. * - * @param string[] $selects The selection expression. + * @param array $selects The selection expression. * * @return QueryBuilder This QueryBuilder instance. */ @@ -414,7 +414,7 @@ public function addSelect(string ...$selects): QueryBuilder * This should only be used for literal SQL expressions as no * quoting/escaping of any kind will be performed on the items. * - * @param string[] $selects Literal SQL expressions to be selected. Warning: No quoting will be done! + * @param array $selects Literal SQL expressions to be selected. Warning: No quoting will be done! * @return QueryBuilder This QueryBuilder instance. */ public function selectLiteral(string ...$selects): QueryBuilder @@ -429,7 +429,7 @@ public function selectLiteral(string ...$selects): QueryBuilder * only be used for literal SQL expressions as no quoting/escaping of * any kind will be performed on the items. * - * @param string[] $selects Literal SQL expressions to be selected. + * @param array $selects Literal SQL expressions to be selected. * @return QueryBuilder This QueryBuilder instance. */ public function addSelectLiteral(string ...$selects): QueryBuilder @@ -625,7 +625,7 @@ public function set(string $key, $value, bool $createNamedParameter = true, int * Specifies one or more restrictions to the query result. * Replaces any previously specified restrictions, if any. * - * @param mixed $predicates + * @param array $predicates * @return QueryBuilder This QueryBuilder instance. */ public function where(...$predicates): QueryBuilder @@ -639,7 +639,7 @@ public function where(...$predicates): QueryBuilder * Adds one or more restrictions to the query results, forming a logical * conjunction with any previously specified restrictions. * - * @param mixed $where The query restrictions. + * @param array $where The query restrictions. * * @return QueryBuilder This QueryBuilder instance. * @@ -656,7 +656,7 @@ public function andWhere(...$where): QueryBuilder * Adds one or more restrictions to the query results, forming a logical * disjunction with any previously specified restrictions. * - * @param mixed $where The WHERE statement. + * @param array $where The WHERE statement. * * @return QueryBuilder This QueryBuilder instance. * @@ -673,7 +673,7 @@ public function orWhere(...$where): QueryBuilder * Specifies a grouping over the results of the query. * Replaces any previously specified groupings, if any. * - * @param mixed $groupBy The grouping expression. + * @param array $groupBy The grouping expression. * * @return QueryBuilder This QueryBuilder instance. */ @@ -687,7 +687,7 @@ public function groupBy(...$groupBy): QueryBuilder /** * Adds a grouping expression to the query. * - * @param mixed $groupBy The grouping expression. + * @param array $groupBy The grouping expression. * * @return QueryBuilder This QueryBuilder instance. */ @@ -743,7 +743,7 @@ public function values(array $values, bool $createNamedParameters = true): Query * Specifies a restriction over the groups of the query. * Replaces any previous having restrictions, if any. * - * @param mixed $having The restriction over the groups. + * @param array $having The restriction over the groups. * * @return QueryBuilder This QueryBuilder instance. */ @@ -757,7 +757,7 @@ public function having(...$having): QueryBuilder * Adds a restriction over the groups of the query, forming a logical * conjunction with any existing having restrictions. * - * @param mixed $having The restriction to append. + * @param array $having The restriction to append. * * @return QueryBuilder This QueryBuilder instance. */ @@ -772,7 +772,7 @@ public function andHaving(...$having): QueryBuilder * Adds a restriction over the groups of the query, forming a logical * disjunction with any existing having restrictions. * - * @param mixed $having The restriction to add. + * @param array $having The restriction to add. * * @return QueryBuilder This QueryBuilder instance. */ diff --git a/typo3/sysext/core/Classes/Database/QueryView.php b/typo3/sysext/core/Classes/Database/QueryView.php index 377a92690686..58689c9a6466 100644 --- a/typo3/sysext/core/Classes/Database/QueryView.php +++ b/typo3/sysext/core/Classes/Database/QueryView.php @@ -254,7 +254,7 @@ public function saveQueryInAction($uid) } // Show query if ($saveArr['queryTable']) { - /** @var $queryGenerator \TYPO3\CMS\Core\Database\QueryGenerator */ + /** @var \TYPO3\CMS\Core\Database\QueryGenerator $queryGenerator */ $queryGenerator = GeneralUtility::makeInstance(QueryGenerator::class); $queryGenerator->init('queryConfig', $saveArr['queryTable']); $queryGenerator->makeSelectorTable($saveArr); diff --git a/typo3/sysext/core/Classes/DependencyInjection/EnvVarProcessor.php b/typo3/sysext/core/Classes/DependencyInjection/EnvVarProcessor.php index 5264434f2f2f..b70bcb4ee725 100644 --- a/typo3/sysext/core/Classes/DependencyInjection/EnvVarProcessor.php +++ b/typo3/sysext/core/Classes/DependencyInjection/EnvVarProcessor.php @@ -28,7 +28,7 @@ class EnvVarProcessor implements EnvVarProcessorInterface * @param string $name The name of the variable within the namespace * @param \Closure $getEnv A closure that allows fetching more env vars * @return mixed - * @throws RuntimeException on error + * @throws \RuntimeException on error */ public function getEnv($prefix, $name, \Closure $getEnv) { diff --git a/typo3/sysext/core/Classes/FormProtection/FormProtectionFactory.php b/typo3/sysext/core/Classes/FormProtection/FormProtectionFactory.php index 44b409c784f5..c9f712da1a22 100644 --- a/typo3/sysext/core/Classes/FormProtection/FormProtectionFactory.php +++ b/typo3/sysext/core/Classes/FormProtection/FormProtectionFactory.php @@ -67,7 +67,7 @@ private function __construct() * @param string $classNameOrType Name of a form protection class, or one * of the pre-defined form protection types: * frontend, backend, installtool - * @param array|mixed[] $constructorArguments Arguments for the class-constructor + * @param array $constructorArguments Arguments for the class-constructor * @return \TYPO3\CMS\Core\FormProtection\AbstractFormProtection the requested instance */ public static function get($classNameOrType = 'default', ...$constructorArguments) @@ -179,7 +179,7 @@ public static function getMessageClosure(LanguageService $languageService, Flash * and stores it internally. * * @param string $className - * @param array|mixed[] $constructorArguments + * @param array $constructorArguments * @throws \InvalidArgumentException * @return AbstractFormProtection */ diff --git a/typo3/sysext/core/Classes/Http/MiddlewareStackResolver.php b/typo3/sysext/core/Classes/Http/MiddlewareStackResolver.php index ba301404227b..d3a574461a39 100644 --- a/typo3/sysext/core/Classes/Http/MiddlewareStackResolver.php +++ b/typo3/sysext/core/Classes/Http/MiddlewareStackResolver.php @@ -99,7 +99,7 @@ protected function loadConfiguration(): ArrayObject /** * Order each stack and sanitize to a plain array * - * @param ArrayObject + * @param ArrayObject $allMiddlewares * @return array */ protected function sanitizeMiddlewares(ArrayObject $allMiddlewares): array diff --git a/typo3/sysext/core/Classes/Imaging/IconRegistry.php b/typo3/sysext/core/Classes/Imaging/IconRegistry.php index 4ee04ca2881b..81ba1c1567b8 100644 --- a/typo3/sysext/core/Classes/Imaging/IconRegistry.php +++ b/typo3/sysext/core/Classes/Imaging/IconRegistry.php @@ -464,7 +464,7 @@ public function __construct() } /** - * @param FrontendInterface $coreCache + * @param FrontendInterface $cache * @internal */ public static function setCache(FrontendInterface $cache) diff --git a/typo3/sysext/core/Classes/Imaging/ImageManipulation/CropVariant.php b/typo3/sysext/core/Classes/Imaging/ImageManipulation/CropVariant.php index 895d54cc4634..03be56617ed5 100644 --- a/typo3/sysext/core/Classes/Imaging/ImageManipulation/CropVariant.php +++ b/typo3/sysext/core/Classes/Imaging/ImageManipulation/CropVariant.php @@ -182,7 +182,7 @@ public function applyRatioRestrictionToSelectedCropArea(FileInterface $file): Cr } /** - * @param Ratio[] $ratios + * @param array $ratios * @throws InvalidConfigurationException */ protected function setAllowedAspectRatios(Ratio ...$ratios) @@ -206,7 +206,7 @@ protected function addAllowedAspectRatio(Ratio $ratio) } /** - * @param Area[] $areas + * @param array $areas * @throws InvalidConfigurationException */ protected function setCoverAreas(Area ...$areas) diff --git a/typo3/sysext/core/Classes/Imaging/ImageManipulation/CropVariantCollection.php b/typo3/sysext/core/Classes/Imaging/ImageManipulation/CropVariantCollection.php index 38400a71f489..c7a364f229d0 100644 --- a/typo3/sysext/core/Classes/Imaging/ImageManipulation/CropVariantCollection.php +++ b/typo3/sysext/core/Classes/Imaging/ImageManipulation/CropVariantCollection.php @@ -25,7 +25,7 @@ class CropVariantCollection protected $cropVariants; /** - * @param CropVariant[] cropVariants + * @param CropVariant[] $cropVariants * @throws \TYPO3\CMS\Core\Imaging\ImageManipulation\InvalidConfigurationException */ public function __construct(array $cropVariants) @@ -154,7 +154,7 @@ protected static function createEmpty(): CropVariantCollection } /** - * @param CropVariant[] $cropVariants + * @param array $cropVariants * @throws \TYPO3\CMS\Core\Imaging\ImageManipulation\InvalidConfigurationException */ protected function setCropVariants(CropVariant ...$cropVariants) diff --git a/typo3/sysext/core/Classes/LinkHandling/TelephoneLinkHandler.php b/typo3/sysext/core/Classes/LinkHandling/TelephoneLinkHandler.php index c02f30d59548..698c87576dbf 100644 --- a/typo3/sysext/core/Classes/LinkHandling/TelephoneLinkHandler.php +++ b/typo3/sysext/core/Classes/LinkHandling/TelephoneLinkHandler.php @@ -25,7 +25,7 @@ class TelephoneLinkHandler implements LinkHandlingInterface * Returns the link to a telephone number as a string * * @param array $parameters - * @return mixed + * @return string */ public function asString(array $parameters): string { diff --git a/typo3/sysext/core/Classes/LinkHandling/UrlLinkHandler.php b/typo3/sysext/core/Classes/LinkHandling/UrlLinkHandler.php index 803f442e4298..59e69550a735 100644 --- a/typo3/sysext/core/Classes/LinkHandling/UrlLinkHandler.php +++ b/typo3/sysext/core/Classes/LinkHandling/UrlLinkHandler.php @@ -26,7 +26,7 @@ class UrlLinkHandler implements LinkHandlingInterface * Returns the URL as given * * @param array $parameters - * @return mixed + * @return string */ public function asString(array $parameters): string { diff --git a/typo3/sysext/core/Classes/Mail/MailMessage.php b/typo3/sysext/core/Classes/Mail/MailMessage.php index 056e17f94223..804623ee61ee 100644 --- a/typo3/sysext/core/Classes/Mail/MailMessage.php +++ b/typo3/sysext/core/Classes/Mail/MailMessage.php @@ -240,7 +240,7 @@ public function setReadReceiptTo(string $address): self /** * Converts address from [email, name] into Address objects. * - * @param string|array $args + * @param array $args * @return Address[] */ protected function convertNamedAddress(...$args): array diff --git a/typo3/sysext/core/Classes/Package/AbstractServiceProvider.php b/typo3/sysext/core/Classes/Package/AbstractServiceProvider.php index ef5dbd06a247..8932beaead6d 100644 --- a/typo3/sysext/core/Classes/Package/AbstractServiceProvider.php +++ b/typo3/sysext/core/Classes/Package/AbstractServiceProvider.php @@ -73,8 +73,8 @@ public static function configureMiddlewares(ContainerInterface $container, Array /** * @param ContainerInterface $container - * @param ArrayObject $middlewares - * @param string $path supplied when invoked internally through PseudoServiceProvider + * @param ArrayObject $routes + * @param string|null $path supplied when invoked internally through PseudoServiceProvider * @return ArrayObject */ public static function configureBackendRoutes(ContainerInterface $container, ArrayObject $routes, string $path = null): ArrayObject diff --git a/typo3/sysext/core/Classes/Package/PackageManager.php b/typo3/sysext/core/Classes/Package/PackageManager.php index 79bee960e8bd..3c103bc9c163 100644 --- a/typo3/sysext/core/Classes/Package/PackageManager.php +++ b/typo3/sysext/core/Classes/Package/PackageManager.php @@ -689,7 +689,7 @@ protected function sortActivePackagesByDependencies() * resolved direct or indirect dependencies of each package will put into the package * states configuration array. * - * @param $packageConfig + * @param array $packageConfig * @return array */ protected function resolvePackageDependencies($packageConfig) diff --git a/typo3/sysext/core/Classes/Resource/File.php b/typo3/sysext/core/Classes/Resource/File.php index eb6a7b6fe042..745361bcdf0d 100644 --- a/typo3/sysext/core/Classes/Resource/File.php +++ b/typo3/sysext/core/Classes/Resource/File.php @@ -342,7 +342,7 @@ protected function getFileIndexRepository() } /** - * @param $key + * @param string $key * @internal Only for use in Repositories and indexer * @return mixed */ diff --git a/typo3/sysext/core/Classes/Resource/Folder.php b/typo3/sysext/core/Classes/Resource/Folder.php index a72cc94a1a5a..f683dd75ed8b 100644 --- a/typo3/sysext/core/Classes/Resource/Folder.php +++ b/typo3/sysext/core/Classes/Resource/Folder.php @@ -77,8 +77,8 @@ class Folder implements FolderInterface * Initialization of the folder * * @param ResourceStorage $storage - * @param $identifier - * @param $name + * @param string $identifier + * @param string $name */ public function __construct(ResourceStorage $storage, $identifier, $name) { diff --git a/typo3/sysext/core/Classes/Resource/ResourceFactory.php b/typo3/sysext/core/Classes/Resource/ResourceFactory.php index 5cec4d270a71..c11a87b6cac8 100644 --- a/typo3/sysext/core/Classes/Resource/ResourceFactory.php +++ b/typo3/sysext/core/Classes/Resource/ResourceFactory.php @@ -177,7 +177,7 @@ public function getStorageObject($uid, array $recordData = [], &$fileIdentifier } elseif (count($recordData) === 0 || (int)$recordData['uid'] !== $uid) { /** @var StorageRepository $storageRepository */ $storageRepository = GeneralUtility::makeInstance(StorageRepository::class); - /** @var ResourceStorage $storage */ + /** @var ResourceStorage $storageObject */ $storageObject = $storageRepository->findByUid($uid); } if (!$storageObject instanceof ResourceStorage) { @@ -561,7 +561,6 @@ public function getObjectFromCombinedIdentifier($identifier) */ public function createFileObject(array $fileData, ResourceStorage $storage = null) { - /** @var File $fileObject */ if (array_key_exists('storage', $fileData) && MathUtility::canBeInterpretedAsInteger($fileData['storage'])) { $storageObject = $this->getStorageObject((int)$fileData['storage']); } elseif ($storage !== null) { @@ -570,6 +569,7 @@ public function createFileObject(array $fileData, ResourceStorage $storage = nul } else { throw new \RuntimeException('A file needs to reside in a Storage', 1381570997); } + /** @var File $fileObject */ $fileObject = GeneralUtility::makeInstance(File::class, $fileData, $storageObject); return $fileObject; } diff --git a/typo3/sysext/core/Classes/Resource/Search/Result/DriverFilteredSearchResult.php b/typo3/sysext/core/Classes/Resource/Search/Result/DriverFilteredSearchResult.php index 64c68805311a..e530f090d883 100644 --- a/typo3/sysext/core/Classes/Resource/Search/Result/DriverFilteredSearchResult.php +++ b/typo3/sysext/core/Classes/Resource/Search/Result/DriverFilteredSearchResult.php @@ -124,7 +124,7 @@ private function initialize(): void /** * Filter out identifiers by calling all attached filters * - * @param File[] $files + * @param array $files * @return array */ private function applyFilters(File ...$files): array diff --git a/typo3/sysext/core/Classes/Routing/Aspect/AspectFactory.php b/typo3/sysext/core/Classes/Routing/Aspect/AspectFactory.php index 006880f1315d..c6ceb95b7be1 100644 --- a/typo3/sysext/core/Classes/Routing/Aspect/AspectFactory.php +++ b/typo3/sysext/core/Classes/Routing/Aspect/AspectFactory.php @@ -95,7 +95,7 @@ protected function create(string $type, array $settings, SiteLanguage $language) * * @param AspectInterface $aspect * @param SiteLanguage $language - * @return AspectInterface|mixed + * @return AspectInterface */ protected function enrich(AspectInterface $aspect, SiteLanguage $language): AspectInterface { diff --git a/typo3/sysext/core/Classes/Routing/PageSlugCandidateProvider.php b/typo3/sysext/core/Classes/Routing/PageSlugCandidateProvider.php index 219e00fb5c74..ccf339710fd7 100644 --- a/typo3/sysext/core/Classes/Routing/PageSlugCandidateProvider.php +++ b/typo3/sysext/core/Classes/Routing/PageSlugCandidateProvider.php @@ -185,7 +185,7 @@ protected function getDecoratingEnhancers(): array * * @param array $slugCandidates * @param int $languageId - * @param string|null $excludeUids when called recursively this is the mountpoint parameter of the original prefix + * @param array $excludeUids when called recursively this is the mountpoint parameter of the original prefix * @return array[]|array * @throws SiteNotFoundException */ diff --git a/typo3/sysext/core/Classes/Site/Entity/Site.php b/typo3/sysext/core/Classes/Site/Entity/Site.php index 72ba0f5c0b15..019ccea6c3de 100644 --- a/typo3/sysext/core/Classes/Site/Entity/Site.php +++ b/typo3/sysext/core/Classes/Site/Entity/Site.php @@ -364,7 +364,7 @@ protected function sanitizeBaseUrl(string $base): string /** * Returns the applicable router for this site. This might be configurable in the future. * - * @param $context + * @param Context|null $context * @return RouterInterface */ public function getRouter(Context $context = null): RouterInterface diff --git a/typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeNode.php b/typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeNode.php index c356a0e2597f..c65136a9411d 100644 --- a/typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeNode.php +++ b/typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeNode.php @@ -47,7 +47,7 @@ class DatabaseTreeNode extends \TYPO3\CMS\Backend\Tree\TreeRepresentationNode /** * Sets the expand state * - * @param $expanded + * @param bool $expanded */ public function setExpanded($expanded) { diff --git a/typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php b/typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php index 726dae303e69..7065d0c19ee9 100644 --- a/typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php +++ b/typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php @@ -27,8 +27,8 @@ class TreeDataProviderFactory * Gets the data provider, depending on TCA configuration * * @param array $tcaConfiguration - * @param $table - * @param $field + * @param string $table + * @param string $field * @param array $currentValue The current database row, handing over 'uid' is enough * @return DatabaseTreeDataProvider * @throws \InvalidArgumentException diff --git a/typo3/sysext/core/Classes/TypoScript/Parser/ConstantConfigurationParser.php b/typo3/sysext/core/Classes/TypoScript/Parser/ConstantConfigurationParser.php index 3c4e3918e83e..68e1edcf7960 100644 --- a/typo3/sysext/core/Classes/TypoScript/Parser/ConstantConfigurationParser.php +++ b/typo3/sysext/core/Classes/TypoScript/Parser/ConstantConfigurationParser.php @@ -215,7 +215,7 @@ public function getConfigurationAsValuedArray(string $rawConfiguration): array * Returns an array with the constants from the whole template which may be edited by the module. * * @param array $flatSetup - * @param $default + * @param array|null $default * @return array */ public function parseComments($flatSetup, $default = null): array diff --git a/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php b/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php index 32f06aeedc01..6999afbfc9cb 100644 --- a/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php +++ b/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php @@ -1356,7 +1356,7 @@ public static function addTypoScriptConstants($content) * @param string $key Is the extension key (informative only). * @param string $type Is either "setup" or "constants" and obviously determines which kind of TypoScript code we are adding. * @param string $content Is the TS content, will be prefixed with a [GLOBAL] line and a comment-header. - * @param int|string string pointing to the "key" of a static_file template ([reduced extension_key]/[local path]). The points is that the TypoScript you add is included only IF that static template is included (and in that case, right after). So effectively the TypoScript you set can specifically overrule settings from those static templates. + * @param int|string $afterStaticUid string pointing to the "key" of a static_file template ([reduced extension_key]/[local path]). The points is that the TypoScript you add is included only IF that static template is included (and in that case, right after). So effectively the TypoScript you set can specifically overrule settings from those static templates. * @throws \InvalidArgumentException */ public static function addTypoScript(string $key, string $type, string $content, $afterStaticUid = 0) diff --git a/typo3/sysext/core/Classes/Utility/GeneralUtility.php b/typo3/sysext/core/Classes/Utility/GeneralUtility.php index 41b9cab00172..0c629e285d88 100644 --- a/typo3/sysext/core/Classes/Utility/GeneralUtility.php +++ b/typo3/sysext/core/Classes/Utility/GeneralUtility.php @@ -2578,8 +2578,8 @@ public static function linkThisUrl($url, array $getParams = []) /** * This method is only for testing and should never be used outside tests- * - * @param $envName - * @param $value + * @param string $envName + * @param mixed $value * @internal */ public static function setIndpEnv($envName, $value) @@ -3413,7 +3413,7 @@ public static function getContainer(): ContainerInterface * the instance of a specific class. * * @param string $className name of the class to instantiate, must not be empty and not start with a backslash - * @param array|mixed[] $constructorArguments Arguments for the constructor + * @param array $constructorArguments Arguments for the constructor * @return object the created instance * @throws \InvalidArgumentException if $className is empty or starts with a backslash */ @@ -3474,7 +3474,7 @@ public static function makeInstance($className, ...$constructorArguments) * container. * * @param string $className name of the class to instantiate - * @param array|mixed[] $constructorArguments Arguments for the constructor + * @param array $constructorArguments Arguments for the constructor * @return object the created instance * @internal */ diff --git a/typo3/sysext/dashboard/Classes/DashboardRepository.php b/typo3/sysext/dashboard/Classes/DashboardRepository.php index 2889802ea7e7..4db64fe024a1 100644 --- a/typo3/sysext/dashboard/Classes/DashboardRepository.php +++ b/typo3/sysext/dashboard/Classes/DashboardRepository.php @@ -133,7 +133,7 @@ public function updateDashboardSettings(string $identifier, array $values) } /** - * @param $values + * @param array $values * @return array */ protected function checkAllowedFields($values): array diff --git a/typo3/sysext/extbase/Classes/Object/Container/Container.php b/typo3/sysext/extbase/Classes/Object/Container/Container.php index 4de5d3c90895..86ac697656b0 100644 --- a/typo3/sysext/extbase/Classes/Object/Container/Container.php +++ b/typo3/sysext/extbase/Classes/Object/Container/Container.php @@ -130,7 +130,7 @@ public function getEmptyObject(string $className): object * Internal implementation for getting a class. * * @param string $className - * @param array $givenConstructorArguments the list of constructor arguments as array + * @param array $givenConstructorArguments the list of constructor arguments as array * @throws \TYPO3\CMS\Extbase\Object\Exception * @throws \TYPO3\CMS\Extbase\Object\Exception\CannotBuildObjectException * @return object the built object @@ -178,7 +178,7 @@ protected function getInstanceInternal(string $className, ...$givenConstructorAr * such that circular references of singletons are correctly instantiated. * * @param ClassSchema $classSchema - * @param array $givenConstructorArguments + * @param array $givenConstructorArguments * @throws \TYPO3\CMS\Extbase\Object\Exception * @return object the new instance */ diff --git a/typo3/sysext/extbase/Classes/Object/ObjectManager.php b/typo3/sysext/extbase/Classes/Object/ObjectManager.php index b224e666a3a1..f576e9e8b4ab 100644 --- a/typo3/sysext/extbase/Classes/Object/ObjectManager.php +++ b/typo3/sysext/extbase/Classes/Object/ObjectManager.php @@ -103,7 +103,7 @@ public function isRegistered(string $objectName): bool * Returns a fresh or existing instance of the object specified by $objectName. * * @param string $objectName The name of the object to return an instance of - * @param array $constructorArguments + * @param array $constructorArguments * @return object The object instance */ public function get(string $objectName, ...$constructorArguments): object diff --git a/typo3/sysext/extbase/Classes/Validation/Validator/GenericObjectValidator.php b/typo3/sysext/extbase/Classes/Validation/Validator/GenericObjectValidator.php index 0808e23590e4..8f1275a8c84a 100644 --- a/typo3/sysext/extbase/Classes/Validation/Validator/GenericObjectValidator.php +++ b/typo3/sysext/extbase/Classes/Validation/Validator/GenericObjectValidator.php @@ -163,7 +163,7 @@ protected function isValidatedAlready($object) } /** - * @param $object + * @param object $object */ protected function markInstanceAsValidated($object): void { diff --git a/typo3/sysext/extensionmanager/Classes/Controller/AbstractController.php b/typo3/sysext/extensionmanager/Classes/Controller/AbstractController.php index 4565c9dd2df1..8864d3024268 100644 --- a/typo3/sysext/extensionmanager/Classes/Controller/AbstractController.php +++ b/typo3/sysext/extensionmanager/Classes/Controller/AbstractController.php @@ -36,7 +36,7 @@ class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControl /** * Translation shortcut * - * @param $key + * @param string $key * @param array|null $arguments * @return string|null */ diff --git a/typo3/sysext/extensionmanager/Classes/Domain/Model/DownloadQueue.php b/typo3/sysext/extensionmanager/Classes/Domain/Model/DownloadQueue.php index a0e570315f3e..3c20dc6a9359 100644 --- a/typo3/sysext/extensionmanager/Classes/Domain/Model/DownloadQueue.php +++ b/typo3/sysext/extensionmanager/Classes/Domain/Model/DownloadQueue.php @@ -124,7 +124,7 @@ public function addExtensionToCopyQueue($extensionKey, $sourceFolder) /** * Remove an extension from extension copy storage * - * @param $extensionKey + * @param string $extensionKey */ public function removeExtensionFromCopyQueue($extensionKey) { diff --git a/typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php b/typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php index 8d0e00fae76e..8b8824752cfc 100644 --- a/typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php +++ b/typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php @@ -153,7 +153,7 @@ public function injectRegistry(\TYPO3\CMS\Core\Registry $registry) * Helper function to install an extension * also processes db updates and clears the cache if the extension asks for it * - * @param array $extensionKeys + * @param array $extensionKeys * @throws ExtensionManagerException */ public function install(...$extensionKeys) @@ -433,7 +433,7 @@ public function getUpdateableVersion(Extension $extensionData) // Only check for update for TER extensions $version = $extensionData->getIntegerVersion(); - /** @var $extensionUpdates [] \TYPO3\CMS\Extensionmanager\Domain\Model\Extension */ + /** @var \TYPO3\CMS\Extensionmanager\Domain\Model\Extension[] $extensionUpdates */ $extensionUpdates = $this->extensionRepository->findByVersionRangeAndExtensionKeyOrderedByVersion( $extensionData->getExtensionKey(), $version, diff --git a/typo3/sysext/extensionmanager/Classes/Utility/ListUtility.php b/typo3/sysext/extensionmanager/Classes/Utility/ListUtility.php index 6fcc3605dd3e..c3b93cbfb0a2 100644 --- a/typo3/sysext/extensionmanager/Classes/Utility/ListUtility.php +++ b/typo3/sysext/extensionmanager/Classes/Utility/ListUtility.php @@ -107,7 +107,7 @@ public function injectPackageManager(PackageManager $packageManager) /** * Returns the list of available, but not necessarily loaded extensions * - * @param string + * @param string $filter * @return array[] All extensions with info */ public function getAvailableExtensions(string $filter = ''): array @@ -262,7 +262,7 @@ protected function getExtensionTerData($extensionKey, $version) * Gets all available and installed extension with additional information * from em_conf and TER (if available) * - * @param string + * @param string $filter * @return array */ public function getAvailableAndInstalledExtensionsWithAdditionalInformation(string $filter = ''): array diff --git a/typo3/sysext/felogin/Classes/Redirect/RedirectHandler.php b/typo3/sysext/felogin/Classes/Redirect/RedirectHandler.php index 76f2996192cc..5b3fbdf6d934 100644 --- a/typo3/sysext/felogin/Classes/Redirect/RedirectHandler.php +++ b/typo3/sysext/felogin/Classes/Redirect/RedirectHandler.php @@ -147,7 +147,7 @@ protected function handleSuccessfulLogout(string $redirectMode, int $redirectPag * Base on setting redirectFirstMethod get first or last entry from redirect url list. * * @param array $redirectUrlList - * @param $redirectFirstMethod + * @param string $redirectFirstMethod * @return string */ protected function fetchReturnUrlFromList(array $redirectUrlList, $redirectFirstMethod): string diff --git a/typo3/sysext/filelist/Classes/Controller/File/CreateFolderController.php b/typo3/sysext/filelist/Classes/Controller/File/CreateFolderController.php index 5c64ea59ac35..5f38159838e2 100644 --- a/typo3/sysext/filelist/Classes/Controller/File/CreateFolderController.php +++ b/typo3/sysext/filelist/Classes/Controller/File/CreateFolderController.php @@ -96,7 +96,7 @@ public function mainAction(ServerRequestInterface $request): ResponseInterface } /** - * @param ServerRequestInterface|null $request + * @param ServerRequestInterface $request * * @throws InsufficientFolderAccessPermissionsException * @throws \RuntimeException diff --git a/typo3/sysext/filelist/Classes/FileList.php b/typo3/sysext/filelist/Classes/FileList.php index b5f3220a1c2b..a5058b0025d0 100644 --- a/typo3/sysext/filelist/Classes/FileList.php +++ b/typo3/sysext/filelist/Classes/FileList.php @@ -820,7 +820,7 @@ public function formatFileList(array $files) /** * Fetch the translations for a sys_file_metadata record * - * @param $metaDataRecord + * @param array $metaDataRecord * @return array keys are the sys_language uids, values are the $rows */ protected function getTranslationsForMetaData($metaDataRecord) diff --git a/typo3/sysext/form/Classes/Domain/Finishers/EmailFinisher.php b/typo3/sysext/form/Classes/Domain/Finishers/EmailFinisher.php index bf0520c071ea..e8671674bf74 100644 --- a/typo3/sysext/form/Classes/Domain/Finishers/EmailFinisher.php +++ b/typo3/sysext/form/Classes/Domain/Finishers/EmailFinisher.php @@ -238,7 +238,7 @@ protected function initializeStandaloneView(FormRuntime $formRuntime, string $fo * * @param string $listOption List option name * @param string $singleAddressOption Single address option - * @param string $singleAddressName Single address name + * @param string|null $singleAddressNameOption Single address name * @return array * * @deprecated since TYPO3 v10.0, will be removed in TYPO3 v11.0. diff --git a/typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php b/typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php index e422f43f1ee8..9d9617a97f8a 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php +++ b/typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php @@ -248,7 +248,6 @@ protected function setFormat(array $conf) */ protected function setExtbaseVariables(array $conf) { - /** @var \TYPO3\CMS\Extbase\Mvc\Request $request */ $requestPluginName = isset($conf['extbase.']['pluginName.']) ? $this->cObj->stdWrap($conf['extbase.']['pluginName'] ?? '', $conf['extbase.']['pluginName.']) : ($conf['extbase.']['pluginName'] ?? ''); diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php index 7e90e219b4ec..293d076a562e 100644 --- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php +++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php @@ -2406,7 +2406,7 @@ public function calculateLinkVars(array $queryParams) /** * Split the link vars string by "," but not if the "," is inside of braces * - * @param $string + * @param string $string * * @return array */ @@ -2995,7 +2995,7 @@ public function INTincScript() GeneralUtility::setSingletonInstance(PageRenderer::class, $pageRenderer); } if (!empty($this->config['INTincScript_ext']['assetCollector'])) { - /** @var AssetCollector $assetCollectorr */ + /** @var AssetCollector $assetCollector */ $assetCollector = unserialize($this->config['INTincScript_ext']['assetCollector'], ['allowed_classes' => [AssetCollector::class]]); GeneralUtility::setSingletonInstance(AssetCollector::class, $assetCollector); } diff --git a/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php b/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php index 5c25f54099b6..0df075ec776c 100644 --- a/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php +++ b/typo3/sysext/frontend/Classes/DataProcessing/LanguageMenuProcessor.php @@ -439,8 +439,8 @@ public function replacePlaceholderInRenderedMenuItem(array $menuItem): array /** * Returns the data from the field and language submitted by $conf in JSON format * - * @param string Empty string (no content to process) - * @param array TypoScript configuration + * @param string $content Empty string (no content to process) + * @param array $conf TypoScript configuration * @return string JSON encoded data * @throws \InvalidArgumentException * @throws \TYPO3\CMS\Core\Exception\SiteNotFoundException diff --git a/typo3/sysext/frontend/Classes/Http/RequestHandler.php b/typo3/sysext/frontend/Classes/Http/RequestHandler.php index 83e7d7689829..f103cd2cb43b 100644 --- a/typo3/sysext/frontend/Classes/Http/RequestHandler.php +++ b/typo3/sysext/frontend/Classes/Http/RequestHandler.php @@ -106,7 +106,7 @@ protected function resetGlobalsToCurrentRequest(ServerRequestInterface $request) * Handles a frontend request, after finishing running middlewares * * @param ServerRequestInterface $request - * @return ResponseInterface|null + * @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { diff --git a/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php b/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php index f19b9bbc1d33..95047b8ada10 100644 --- a/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php +++ b/typo3/sysext/frontend/Classes/Middleware/SiteBaseRedirectResolver.php @@ -89,7 +89,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface /** * Checks if the language is allowed in Frontend, if not, check if there is valid BE user * - * @param SiteLanguage|null $language + * @param SiteLanguage $language * @param BackendUserAuthentication|null $user * @return bool */ diff --git a/typo3/sysext/frontend/Classes/Page/CacheHashCalculator.php b/typo3/sysext/frontend/Classes/Page/CacheHashCalculator.php index 6422a9085fc8..8b7c2ba7ceb8 100644 --- a/typo3/sysext/frontend/Classes/Page/CacheHashCalculator.php +++ b/typo3/sysext/frontend/Classes/Page/CacheHashCalculator.php @@ -215,7 +215,7 @@ protected function hasCachedParametersWhiteList() /** * Check whether the given parameter may be used even with an empty value * - * @param $key + * @param string $key * @return bool */ protected function isAllowedWithEmptyValue($key) diff --git a/typo3/sysext/indexed_search/Classes/Indexer.php b/typo3/sysext/indexed_search/Classes/Indexer.php index 74c42863fb0a..46771f0ab7e1 100644 --- a/typo3/sysext/indexed_search/Classes/Indexer.php +++ b/typo3/sysext/indexed_search/Classes/Indexer.php @@ -280,8 +280,8 @@ public function hook_indexContent(&$pObj) $this->conf['gr_list'] = implode(',', GeneralUtility::makeInstance(Context::class)->getPropertyFromAspect('frontend.user', 'groupIds', [0, -1])); // page arguments array $this->conf['staticPageArguments'] = []; - /** @var PageArguments $pageArguments */ if ($GLOBALS['TYPO3_REQUEST'] instanceof ServerRequestInterface) { + /** @var PageArguments $pageArguments */ $pageArguments = $GLOBALS['TYPO3_REQUEST']->getAttribute('routing', null); if ($pageArguments instanceof PageArguments) { $this->conf['staticPageArguments'] = $pageArguments->getStaticArguments(); diff --git a/typo3/sysext/indexed_search/Classes/Lexer.php b/typo3/sysext/indexed_search/Classes/Lexer.php index 65f2293adadc..d1b8f65a475a 100644 --- a/typo3/sysext/indexed_search/Classes/Lexer.php +++ b/typo3/sysext/indexed_search/Classes/Lexer.php @@ -56,7 +56,7 @@ class Lexer * Splitting string into words. * Used for indexing, can also be used to find words in query. * - * @param string String with UTF-8 content to process. + * @param string $wordString String with UTF-8 content to process. * @return array Array of words in utf-8 */ public function split2Words($wordString) diff --git a/typo3/sysext/indexed_search/Classes/ViewHelpers/PageBrowsingResultsViewHelper.php b/typo3/sysext/indexed_search/Classes/ViewHelpers/PageBrowsingResultsViewHelper.php index 225ae1cd6849..16873c648585 100644 --- a/typo3/sysext/indexed_search/Classes/ViewHelpers/PageBrowsingResultsViewHelper.php +++ b/typo3/sysext/indexed_search/Classes/ViewHelpers/PageBrowsingResultsViewHelper.php @@ -46,7 +46,7 @@ public function initializeArguments() /** * @param array $arguments - * @param callable|\Closure $renderChildrenClosure + * @param \Closure $renderChildrenClosure * @param RenderingContextInterface $renderingContext * @return string */ diff --git a/typo3/sysext/install/Classes/Command/UpgradeWizardRunCommand.php b/typo3/sysext/install/Classes/Command/UpgradeWizardRunCommand.php index 23ec72efef28..39edb58af557 100644 --- a/typo3/sysext/install/Classes/Command/UpgradeWizardRunCommand.php +++ b/typo3/sysext/install/Classes/Command/UpgradeWizardRunCommand.php @@ -125,8 +125,8 @@ protected function execute(InputInterface $input, OutputInterface $output) * Get Wizard instance by class name and identifier * Returns null if wizard is already done * - * @param $className - * @param $identifier + * @param string $className + * @param string $identifier * @return \TYPO3\CMS\Install\Updates\UpgradeWizardInterface|null */ protected function getWizard(string $className, string $identifier): ?UpgradeWizardInterface diff --git a/typo3/sysext/install/Classes/Controller/BackendModuleController.php b/typo3/sysext/install/Classes/Controller/BackendModuleController.php index bd1e432d3459..85ff91fc50b8 100644 --- a/typo3/sysext/install/Classes/Controller/BackendModuleController.php +++ b/typo3/sysext/install/Classes/Controller/BackendModuleController.php @@ -75,7 +75,7 @@ public function environmentAction(): ResponseInterface * Starts / updates the session and redirects to the install tool * with given action. * - * @param $controller + * @param string $controller * @return ResponseInterface */ protected function setAuthorizedAndRedirect(string $controller): ResponseInterface diff --git a/typo3/sysext/install/Classes/Http/NotFoundRequestHandler.php b/typo3/sysext/install/Classes/Http/NotFoundRequestHandler.php index 463e844aa447..7c4aaa5aba38 100644 --- a/typo3/sysext/install/Classes/Http/NotFoundRequestHandler.php +++ b/typo3/sysext/install/Classes/Http/NotFoundRequestHandler.php @@ -31,7 +31,6 @@ class NotFoundRequestHandler implements RequestHandlerInterface * Handles an Install Tool request when previously executed middlewares didn't handle thr request. * * @param ServerRequestInterface $request - * @param RequestHandlerInterface $handler * @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface diff --git a/typo3/sysext/install/Classes/Report/EnvironmentStatusReport.php b/typo3/sysext/install/Classes/Report/EnvironmentStatusReport.php index 2426a34e119b..45eeca3d12fa 100644 --- a/typo3/sysext/install/Classes/Report/EnvironmentStatusReport.php +++ b/typo3/sysext/install/Classes/Report/EnvironmentStatusReport.php @@ -52,7 +52,7 @@ public function getDetailedStatus() } /** - * @param $verbose + * @param bool $verbose * @return Status[] */ protected function getStatusInternal($verbose) diff --git a/typo3/sysext/install/Classes/Service/LateBootService.php b/typo3/sysext/install/Classes/Service/LateBootService.php index d3486017a03a..2d6f0a797fbf 100644 --- a/typo3/sysext/install/Classes/Service/LateBootService.php +++ b/typo3/sysext/install/Classes/Service/LateBootService.php @@ -47,7 +47,7 @@ class LateBootService /** * @param ContainerBuilder $containerBuilder - * @param ConteinerInterface $failsafeContainer + * @param ContainerInterface $failsafeContainer */ public function __construct(ContainerBuilder $containerBuilder, ContainerInterface $failsafeContainer) { @@ -83,7 +83,7 @@ private function prepareContainer(): ContainerInterface * is specified * * @param ContainerInterface $container - * @param array $backup + * @param array $oldBackup * @return array */ public function makeCurrent(ContainerInterface $container = null, array $oldBackup = []): array diff --git a/typo3/sysext/install/Classes/Service/LocalConfigurationValueService.php b/typo3/sysext/install/Classes/Service/LocalConfigurationValueService.php index 280a01432f60..43118954bb85 100644 --- a/typo3/sysext/install/Classes/Service/LocalConfigurationValueService.php +++ b/typo3/sysext/install/Classes/Service/LocalConfigurationValueService.php @@ -65,7 +65,7 @@ public function getCurrentConfigurationData(): array * to check entries recursively. * * @param array $sections - * @param array|null $sectionsFromCurrentConfiguration + * @param array $sectionsFromCurrentConfiguration * @param array $descriptions * @param array $path * @return array diff --git a/typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck.php b/typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck.php index 6287e196e3f1..a88c8d26bcd4 100644 --- a/typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck.php +++ b/typo3/sysext/install/Classes/SystemEnvironment/DatabaseCheck.php @@ -282,7 +282,7 @@ public static function retrieveDatabasePlatformByDriverName(string $databaseDriv /** * @param string $driverName - * @return Driver + * @return string * @throws Exception */ public static function retrieveDatabaseDriverClassByDriverName(string $driverName): string diff --git a/typo3/sysext/install/Classes/UpgradeAnalysis/DocumentationFile.php b/typo3/sysext/install/Classes/UpgradeAnalysis/DocumentationFile.php index 6ba1f8b13cfd..6304ef6076ef 100644 --- a/typo3/sysext/install/Classes/UpgradeAnalysis/DocumentationFile.php +++ b/typo3/sysext/install/Classes/UpgradeAnalysis/DocumentationFile.php @@ -88,7 +88,7 @@ public function findDocumentationDirectories(string $path): array $directories = []; foreach ($finder->directories() as $directory) { - /** @var $directory SplFileInfo */ + /** @var SplFileInfo $directory */ $directories[] = $directory->getBasename(); } @@ -260,7 +260,7 @@ protected function getDocumentationFilesForVersion(string $docDirectory): array $finder = $this->getDocumentFinder()->in($absolutePath); foreach ($finder->files() as $file) { - /** @var $file SplFileInfo */ + /** @var SplFileInfo $file */ $documentationFiles[] = $this->getListEntry($file->getPathname()); } @@ -270,7 +270,7 @@ protected function getDocumentationFilesForVersion(string $docDirectory): array /** * Merge tag list * - * @param $documentationFiles + * @param iterable $documentationFiles * @return array */ protected function collectTagTotal($documentationFiles): array diff --git a/typo3/sysext/recycler/Classes/Domain/Model/DeletedRecords.php b/typo3/sysext/recycler/Classes/Domain/Model/DeletedRecords.php index b0ccd79b3174..9c394a3da25d 100644 --- a/typo3/sysext/recycler/Classes/Domain/Model/DeletedRecords.php +++ b/typo3/sysext/recycler/Classes/Domain/Model/DeletedRecords.php @@ -514,7 +514,7 @@ protected function getTreeList(int $id, int $depth, int $begin = 0): array } /** - * @param $id + * @param int $id * @param int $depth * @param int $begin * @param string $permsClause diff --git a/typo3/sysext/redirects/Classes/Service/RedirectService.php b/typo3/sysext/redirects/Classes/Service/RedirectService.php index 70ba13a42566..f4030d1d9007 100644 --- a/typo3/sysext/redirects/Classes/Service/RedirectService.php +++ b/typo3/sysext/redirects/Classes/Service/RedirectService.php @@ -259,7 +259,7 @@ protected function addQueryParams(array $queryParams, Uri $url): Uri * Called when TypoScript/TSFE is available, so typolink is used to generate the URL * * @param array $redirectRecord - * @param FrontendUserAuthentication|null $frontendUserAuthentication + * @param FrontendUserAuthentication $frontendUserAuthentication * @param SiteInterface|null $site * @param array $linkDetails * @param array $queryParams @@ -313,7 +313,7 @@ protected function getUriFromCustomLinkDetails(array $redirectRecord, FrontendUs * * So a link to a page can be generated. * - * @param FrontendUserAuthentication|null $frontendUserAuthentication + * @param FrontendUserAuthentication $frontendUserAuthentication * @param SiteInterface|null $site * @param array $queryParams * @return TypoScriptFrontendController diff --git a/typo3/sysext/scheduler/Classes/Task/ExecuteSchedulableCommandAdditionalFieldProvider.php b/typo3/sysext/scheduler/Classes/Task/ExecuteSchedulableCommandAdditionalFieldProvider.php index aa251447f43d..e61bed3d56fb 100644 --- a/typo3/sysext/scheduler/Classes/Task/ExecuteSchedulableCommandAdditionalFieldProvider.php +++ b/typo3/sysext/scheduler/Classes/Task/ExecuteSchedulableCommandAdditionalFieldProvider.php @@ -383,7 +383,7 @@ protected function renderSelectField(array $options, string $selectedOptionValue * Renders a field for defining an argument's value * * @param InputArgument $argument - * @param mixed $currentValue + * @param string $currentValue * @return string */ protected function renderArgumentField(InputArgument $argument, string $currentValue): string @@ -405,7 +405,7 @@ protected function renderArgumentField(InputArgument $argument, string $currentV * Renders a field for defining an option's value * * @param InputOption $option - * @param mixed $currentValue + * @param string $currentValue * @return string */ protected function renderOptionField(InputOption $option, bool $enabled, string $currentValue): string diff --git a/typo3/sysext/workspaces/Classes/Middleware/WorkspacePreview.php b/typo3/sysext/workspaces/Classes/Middleware/WorkspacePreview.php index 84c308af5f25..50fd930ee118 100644 --- a/typo3/sysext/workspaces/Classes/Middleware/WorkspacePreview.php +++ b/typo3/sysext/workspaces/Classes/Middleware/WorkspacePreview.php @@ -354,7 +354,7 @@ protected function renderPreviewInfo(TypoScriptFrontendController $tsfe, Normali /** * Fetches the title of the workspace * - * @param $workspaceId + * @param int $workspaceId * @return string the title of the workspace */ protected function getWorkspaceTitle(int $workspaceId): string diff --git a/typo3/sysext/workspaces/Classes/Service/StagesService.php b/typo3/sysext/workspaces/Classes/Service/StagesService.php index 765aee629b96..b44e86bb5ac9 100644 --- a/typo3/sysext/workspaces/Classes/Service/StagesService.php +++ b/typo3/sysext/workspaces/Classes/Service/StagesService.php @@ -553,7 +553,7 @@ protected function getWorkspaceRecord() } /** - * @param $grList + * @param string $grList * @param string $idList * @return array */ @@ -599,7 +599,7 @@ private function fetchGroupsFromDB(array $groups) /** * Fetches particular groups recursively. * - * @param $grList + * @param string $grList * @param string $idList * @return array */ @@ -735,7 +735,7 @@ public function isNextStageAllowedForUser($stageId) } /** - * @param $stageId + * @param int $stageId * @return bool */ protected function isStageAllowedForUser($stageId)