Commit c59cd7c4 authored by crell's avatar crell Committed by Stefan Bürk
Browse files

[TASK] Correct incomplete doc types

ExtensionStatus::getStatus()'s doc type does not account for
the use of [] as a sentinel value.

The extra doc type declaration in
FolderBasedFileCollection::fromArray() is incorrect, as it
does not account for null return values.

Used command:

> ./Build/Scripts/runTests.sh -s phpstanGenerateBaseline

Resolves: #98003
Releases: main, 11.5
Change-Id: Ifaad71a8e65836e943b1a3813f3294e7421c5402
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75264

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
parent ddff5479
......@@ -935,11 +935,6 @@ parameters:
count: 1
path: ../../typo3/sysext/core/Classes/Resource/AbstractFile.php
-
message: "#^If condition is always true\\.$#"
count: 1
path: ../../typo3/sysext/core/Classes/Resource/Collection/FolderBasedFileCollection.php
-
message: "#^Method TYPO3\\\\CMS\\\\Core\\\\Resource\\\\FileCollectionRepository\\:\\:createDomainObject\\(\\) should return TYPO3\\\\CMS\\\\Core\\\\Resource\\\\Collection\\\\AbstractFileCollection but returns TYPO3\\\\CMS\\\\Core\\\\Collection\\\\CollectionInterface\\<TYPO3\\\\CMS\\\\Core\\\\Resource\\\\File\\>\\.$#"
count: 1
......@@ -2530,11 +2525,6 @@ parameters:
count: 1
path: ../../typo3/sysext/extensionmanager/Tests/Unit/Fixtures/LatestCompatibleExtensionObjectStorageFixture.php
-
message: "#^If condition is always true\\.$#"
count: 1
path: ../../typo3/sysext/extensionmanager/Tests/Unit/Report/ExtensionStatusTest.php
-
message: "#^PHPDoc tag @throws with type TYPO3\\\\CMS\\\\Extbase\\\\Object\\\\Exception is not subtype of Throwable$#"
count: 1
......
......@@ -16,7 +16,6 @@
namespace TYPO3\CMS\Core\Resource\Collection;
use TYPO3\CMS\Core\Resource\Folder;
use TYPO3\CMS\Core\Resource\ResourceStorage;
use TYPO3\CMS\Core\Resource\StorageRepository;
use TYPO3\CMS\Core\Utility\GeneralUtility;
......@@ -115,7 +114,6 @@ class FolderBasedFileCollection extends AbstractFileCollection
$this->recursive = (bool)$array['recursive'];
if (!empty($array['folder']) && !empty($array['storage'])) {
$storageRepository = GeneralUtility::makeInstance(StorageRepository::class);
/** @var ResourceStorage $storage */
$storage = $storageRepository->findByUid($array['storage']);
if ($storage) {
$this->folder = $storage->getFolder($array['folder']);
......
......@@ -76,7 +76,7 @@ class ExtensionStatus implements StatusProviderInterface
/**
* Determines extension manager status
*
* @return Status[] List of statuses
* @return array<string, Status|array> List of statuses
*/
public function getStatus(): array
{
......
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