Commit 93baa919 authored by Alexander Schnitzler's avatar Alexander Schnitzler Committed by Benni Mack
Browse files

[TASK] Adjust php doc blocks for phpstan level 2 compatibility

Releases: master
Resolves: #90766
Change-Id: I59823ed9b573344a96823d3308b253edcc765a65
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63682


Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Oliver Klee's avatarOliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent a51eff36
......@@ -25,7 +25,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
class OnTheFly implements FormDataGroupInterface
{
/**
* @var array<FormDataProviderInterface>
* @var string[]
*/
protected $providerList = [];
......
......@@ -45,7 +45,6 @@ class QueryParser
* Retrieve the validated command key
*
* @param string $query
* @return string Command name
*/
protected function extractKeyFromQuery($query)
{
......
......@@ -46,6 +46,7 @@ class FailsafeContainer implements ContainerInterface
$factories = [];
foreach ($providers as $provider) {
/** @var ServiceProviderInterface $provider */
$factories = $provider->getFactories() + $factories;
foreach ($provider->getExtensions() as $id => $extension) {
// Decorate a previously defined extension or if that is not available,
......
......@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Core\Http;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\StreamInterface;
use Psr\Http\Message\UploadedFileInterface;
use Psr\Http\Message\UriInterface;
/**
* Represents a typical request incoming from the server to be processed
......
......@@ -18,6 +18,7 @@ namespace TYPO3\CMS\Core\Http;
use Psr\Http\Message\ServerRequestFactoryInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\UploadedFileInterface;
use Psr\Http\Message\UriInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
......
......@@ -532,7 +532,7 @@ class Folder implements FolderInterface
*
* The parent folder of the root folder is the root folder.
*
* @return Folder
* @return FolderInterface
*/
public function getParentFolder()
{
......
......@@ -111,6 +111,7 @@ class AspectFactory
{
// the check for the trait can be removed at any time after TYPO3 v11
if ($aspect instanceof SiteLanguageAwareInterface || in_array(SiteLanguageAwareTrait::class, class_uses($aspect), true)) {
/** @var AspectInterface|SiteLanguageAwareInterface $aspect */
$aspect->setSiteLanguage($language);
}
if ($aspect instanceof ContextAwareInterface) {
......
......@@ -456,7 +456,7 @@ class ExtendedTemplateService extends TemplateService
* lineNumbers are in sync with the calculated lineNumbers '.ln..' in TypoScriptParser
*
* @param array $lnArr Array with linenumbers (might have some extra symbols, for example for unsetting) to be processed
* @return array The same array where each entry has been prepended by the template title if available
* @return string Imploded array of line number and template title
*/
public function lineNumberToScript(array $lnArr)
{
......@@ -727,7 +727,7 @@ class ExtendedTemplateService extends TemplateService
/**
* @param int $lineNumber Line Number
* @param array $str
* @param string $str
* @return string
*/
public function ext_lnBreakPointWrap($lineNumber, $str)
......
......@@ -433,7 +433,6 @@ class InstallUtility implements SingletonInterface, LoggerAwareInterface
// Only check for update for TER extensions
$version = $extensionData->getIntegerVersion();
/** @var \TYPO3\CMS\Extensionmanager\Domain\Model\Extension[] $extensionUpdates */
$extensionUpdates = $this->extensionRepository->findByVersionRangeAndExtensionKeyOrderedByVersion(
$extensionData->getExtensionKey(),
$version,
......@@ -442,6 +441,7 @@ class InstallUtility implements SingletonInterface, LoggerAwareInterface
);
if ($extensionUpdates->count() > 0) {
foreach ($extensionUpdates as $extensionUpdate) {
/** @var \TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extensionUpdate */
try {
$this->dependencyUtility->checkDependencies($extensionUpdate);
if (!$this->dependencyUtility->hasDependencyErrors()) {
......
......@@ -252,7 +252,6 @@ abstract class AbstractWidgetViewHelper extends AbstractViewHelper
* The widget identifier is unique on the current page, and is used
* in the URI as a namespace for the widget's arguments.
*
* @return string the widget identifier for this widget
* @todo clean up, and make it somehow more routing compatible.
*/
private function initializeWidgetIdentifier()
......
......@@ -20,6 +20,7 @@ namespace TYPO3\CMS\Form\ViewHelpers\Form;
use TYPO3\CMS\Core\Page\PageRenderer;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper;
use TYPO3\CMS\Form\Domain\Runtime\FormRuntime;
use TYPO3\CMS\Form\ViewHelpers\RenderRenderableViewHelper;
/**
......
......@@ -392,6 +392,7 @@ class Import extends ImportExport
// check, if there is an identical file
try {
if ($storage->hasFile($fileRecord['identifier'])) {
/** @var File $file */
$file = $storage->getFile($fileRecord['identifier']);
if ($file->getSha1() === $fileRecord['sha1']) {
$newFile = $file;
......
......@@ -150,7 +150,7 @@ class TranslationStatusController
/**
* Rendering the localization information table.
*
* @param array $tree The Page tree data
* @param PageTreeView $tree The Page tree data
* @return string HTML for the localization information table.
*/
protected function renderL10nTable(&$tree)
......
......@@ -45,6 +45,7 @@ use TYPO3\CMS\Core\Http\NormalizedParams;
use TYPO3\CMS\Core\Information\Typo3Version;
use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
use TYPO3\CMS\Core\Package\FailsafePackageManager;
use TYPO3\CMS\Core\Package\PackageInterface;
use TYPO3\CMS\Core\Package\PackageManager;
use TYPO3\CMS\Core\Registry;
......@@ -177,6 +178,7 @@ class InstallerController
// Create a PackageStates.php with all packages activated marked as "part of factory default"
if (!file_exists(Environment::getLegacyConfigPath() . '/PackageStates.php')) {
/** @var FailsafePackageManager $packageManager */
$packageManager = GeneralUtility::makeInstance(PackageManager::class);
$packages = $packageManager->getAvailablePackages();
foreach ($packages as $package) {
......
......@@ -47,7 +47,7 @@ class SystemStatusUpdateTaskNotificationEmailField extends AbstractAdditionalFie
* Gets additional fields to render in the form to add/edit a task
*
* @param array $taskInfo Values of the fields from the add/edit task form
* @param AbstractTask|null $task When editing, reference to the current task. NULL when adding.
* @param SystemStatusUpdateTask|null $task When editing, reference to the current task. NULL when adding.
* @param SchedulerModuleController $schedulerModule Reference to the scheduler backend module
* @return array A two dimensional array, array('Identifier' => array('fieldId' => array('code' => '', 'label' => '', 'cshKey' => '', 'cshLabel' => ''))
*/
......@@ -115,7 +115,7 @@ class SystemStatusUpdateTaskNotificationEmailField extends AbstractAdditionalFie
* Takes care of saving the additional fields' values in the task's object
*
* @param array $submittedData An array containing the data submitted by the add/edit task form
* @param AbstractTask $task Reference to the scheduler backend module
* @param SystemStatusUpdateTask $task Reference to the scheduler backend module
* @throws \InvalidArgumentException
*/
public function saveAdditionalFields(array $submittedData, AbstractTask $task)
......
......@@ -32,7 +32,7 @@ class SleepTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvider
* In this case, it adds a sleep time field
*
* @param array $taskInfo Reference to the array containing the info used in the add/edit form
* @param AbstractTask|null $task When editing, reference to the current task. NULL when adding.
* @param SleepTask|null $task When editing, reference to the current task. NULL when adding.
* @param SchedulerModuleController $schedulerModule Reference to the calling object (Scheduler's BE module)
* @return array Array containing all the information pertaining to the additional fields
*/
......@@ -91,7 +91,7 @@ class SleepTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvider
* if the task class matches
*
* @param array $submittedData Array containing the data submitted by the user
* @param AbstractTask $task Reference to the current task object
* @param SleepTask $task Reference to the current task object
*/
public function saveAdditionalFields(array $submittedData, AbstractTask $task)
{
......
......@@ -32,7 +32,7 @@ class TestTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvider
* In this case, it adds an email field
*
* @param array $taskInfo Reference to the array containing the info used in the add/edit form
* @param AbstractTask|null $task When editing, reference to the current task. NULL when adding.
* @param TestTask|null $task When editing, reference to the current task. NULL when adding.
* @param SchedulerModuleController $schedulerModule Reference to the calling object (Scheduler's BE module)
* @return array Array containing all the information pertaining to the additional fields
*/
......@@ -94,7 +94,7 @@ class TestTaskAdditionalFieldProvider extends AbstractAdditionalFieldProvider
* if the task class matches
*
* @param array $submittedData Array containing the data submitted by the user
* @param \TYPO3\CMS\Scheduler\Task\AbstractTask $task Reference to the current task object
* @param TestTask $task Reference to the current task object
*/
public function saveAdditionalFields(array $submittedData, AbstractTask $task)
{
......
......@@ -32,7 +32,7 @@ class CachingFrameworkGarbageCollectionAdditionalFieldProvider extends AbstractA
* Add a multi select box with all available cache backends.
*
* @param array $taskInfo Reference to the array containing the info used in the add/edit form
* @param AbstractTask|null $task When editing, reference to the current task. NULL when adding.
* @param CachingFrameworkGarbageCollectionTask|null $task When editing, reference to the current task. NULL when adding.
* @param SchedulerModuleController $schedulerModule Reference to the calling object (Scheduler's BE module)
* @return array Array containing all the information pertaining to the additional fields
*/
......@@ -95,7 +95,7 @@ class CachingFrameworkGarbageCollectionAdditionalFieldProvider extends AbstractA
* Save selected backends in task object
*
* @param array $submittedData Contains data submitted by the user
* @param \TYPO3\CMS\Scheduler\Task\AbstractTask $task Reference to the current task object
* @param CachingFrameworkGarbageCollectionTask $task Reference to the current task object
*/
public function saveAdditionalFields(array $submittedData, AbstractTask $task)
{
......
......@@ -68,7 +68,7 @@ class ExecuteSchedulableCommandAdditionalFieldProvider implements AdditionalFiel
* Render additional information fields within the scheduler backend.
*
* @param array $taskInfo Array information of task to return
* @param AbstractTask|null $task When editing, reference to the current task. NULL when adding.
* @param ExecuteSchedulableCommandTask|null $task When editing, reference to the current task. NULL when adding.
* @param SchedulerModuleController $schedulerModule Reference to the calling object (BE module of the Scheduler)
* @return array Additional fields
* @see \TYPO3\CMS\Scheduler\AdditionalFieldProviderInterface::getAdditionalFields
......@@ -176,7 +176,7 @@ class ExecuteSchedulableCommandAdditionalFieldProvider implements AdditionalFiel
* Saves additional field values
*
* @param array $submittedData
* @param AbstractTask $task
* @param ExecuteSchedulableCommandTask $task
* @return bool
*/
public function saveAdditionalFields(array $submittedData, AbstractTask $task): bool
......
......@@ -48,7 +48,7 @@ class IpAnonymizationAdditionalFieldProvider extends AbstractAdditionalFieldProv
* Add a select field of available tables.
*
* @param array $taskInfo Reference to the array containing the info used in the add/edit form
* @param AbstractTask|null $task When editing, reference to the current task. NULL when adding.
* @param IpAnonymizationTask|null $task When editing, reference to the current task. NULL when adding.
* @param SchedulerModuleController $schedulerModule Reference to the calling object (Scheduler's BE module)
* @return array Array containing all the information pertaining to the additional fields
*/
......@@ -91,7 +91,7 @@ class IpAnonymizationAdditionalFieldProvider extends AbstractAdditionalFieldProv
* Add an input field to get the number of days.
*
* @param array $taskInfo Reference to the array containing the info used in the add/edit form
* @param AbstractTask|null $task When editing, reference to the current task. NULL when adding.
* @param IpAnonymizationTask|null $task When editing, reference to the current task. NULL when adding.
* @param SchedulerModuleController $schedulerModule Reference to the calling object (Scheduler's BE module)
* @return array Array containing all the information pertaining to the additional fields
*/
......@@ -116,7 +116,7 @@ class IpAnonymizationAdditionalFieldProvider extends AbstractAdditionalFieldProv
* Add an input field to get the mask.
*
* @param array $taskInfo Reference to the array containing the info used in the add/edit form
* @param AbstractTask|null $task When editing, reference to the current task. NULL when adding.
* @param IpAnonymizationTask|null $task When editing, reference to the current task. NULL when adding.
* @param SchedulerModuleController $schedulerModule Reference to the calling object (Scheduler's BE module)
* @return array Array containing all the information pertaining to the additional fields
*/
......@@ -205,7 +205,7 @@ class IpAnonymizationAdditionalFieldProvider extends AbstractAdditionalFieldProv
* Save additional field in task
*
* @param array $submittedData Contains data submitted by the user
* @param \TYPO3\CMS\Scheduler\Task\AbstractTask $task Reference to the current task object
* @param IpAnonymizationTask $task Reference to the current task object
*/
public function saveAdditionalFields(array $submittedData, AbstractTask $task)
{
......
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