Commit 1ac8bbdc authored by Nikita Hovratov's avatar Nikita Hovratov Committed by Christian Kuhn
Browse files

[TASK] Remove redundant @var tags

The type can already be inferred from the source
code.

The cleanup was run automatically with a
PHPStorm plugin.

Resolves: #96482
Releases: main
Change-Id: I669145adc66dc898f3016de1958cf0105c988243
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72907


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Benjamin Franzke's avatarBenjamin Franzke <bfr@qbus.de>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benjamin Franzke's avatarBenjamin Franzke <bfr@qbus.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 84f22765
...@@ -89,7 +89,6 @@ class Log extends AbstractSubModule implements DataProviderInterface, ModuleSett ...@@ -89,7 +89,6 @@ class Log extends AbstractSubModule implements DataProviderInterface, ModuleSett
$log = InMemoryLogWriter::$log; $log = InMemoryLogWriter::$log;
$logArray = []; $logArray = [];
/** @var \TYPO3\CMS\Core\Log\LogRecord $logRecord */
foreach ($log as $logRecord) { foreach ($log as $logRecord) {
$entry = $logRecord->toArray(); $entry = $logRecord->toArray();
// store only necessary info // store only necessary info
......
...@@ -77,7 +77,6 @@ class PageTitle extends AbstractSubModule implements DataProviderInterface ...@@ -77,7 +77,6 @@ class PageTitle extends AbstractSubModule implements DataProviderInterface
]; ];
$log = InMemoryLogWriter::$log; $log = InMemoryLogWriter::$log;
/** @var \TYPO3\CMS\Core\Log\LogRecord $logEntry */
foreach ($log as $logEntry) { foreach ($log as $logEntry) {
if ($logEntry->getComponent() === self::LOG_COMPONENT) { if ($logEntry->getComponent() === self::LOG_COMPONENT) {
if (isset($logEntry->getData()['orderedTitleProviders'])) { if (isset($logEntry->getData()['orderedTitleProviders'])) {
......
...@@ -142,7 +142,6 @@ class OnlineMediaController ...@@ -142,7 +142,6 @@ class OnlineMediaController
/** @var FlashMessageService $flashMessageService */ /** @var FlashMessageService $flashMessageService */
$flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
/** @var \TYPO3\CMS\Core\Messaging\FlashMessageQueue $defaultFlashMessageQueue */
$defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier(); $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
$defaultFlashMessageQueue->enqueue($flashMessage); $defaultFlashMessageQueue->enqueue($flashMessage);
} }
......
...@@ -28,7 +28,6 @@ use TYPO3\CMS\Core\Database\RelationHandler; ...@@ -28,7 +28,6 @@ use TYPO3\CMS\Core\Database\RelationHandler;
use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Localization\LanguageService; use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Messaging\FlashMessage; use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
use TYPO3\CMS\Core\Messaging\FlashMessageService; use TYPO3\CMS\Core\Messaging\FlashMessageService;
use TYPO3\CMS\Core\Resource\FileRepository; use TYPO3\CMS\Core\Resource\FileRepository;
use TYPO3\CMS\Core\Resource\ResourceStorage; use TYPO3\CMS\Core\Resource\ResourceStorage;
...@@ -283,7 +282,6 @@ abstract class AbstractItemProvider ...@@ -283,7 +282,6 @@ abstract class AbstractItemProvider
$flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $msg, $msgTitle, FlashMessage::ERROR, true); $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, $msg, $msgTitle, FlashMessage::ERROR, true);
/** @var FlashMessageService $flashMessageService */ /** @var FlashMessageService $flashMessageService */
$flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
/** @var FlashMessageQueue $defaultFlashMessageQueue */
$defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier(); $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
$defaultFlashMessageQueue->enqueue($flashMessage); $defaultFlashMessageQueue->enqueue($flashMessage);
return $items; return $items;
......
...@@ -412,7 +412,6 @@ class BackendUtilityTest extends UnitTestCase ...@@ -412,7 +412,6 @@ class BackendUtilityTest extends UnitTestCase
*/ */
public function getProcessedValueDisplaysAgeForDateInputFieldsIfSettingAbsent(): void public function getProcessedValueDisplaysAgeForDateInputFieldsIfSettingAbsent(): void
{ {
/** @var ObjectProphecy $languageServiceProphecy */
$languageServiceProphecy = $this->prophesize(LanguageService::class); $languageServiceProphecy = $this->prophesize(LanguageService::class);
$languageServiceProphecy->sL(Argument::cetera())->willReturn(' min| hrs| days| yrs| min| hour| day| year'); $languageServiceProphecy->sL(Argument::cetera())->willReturn(' min| hrs| days| yrs| min| hour| day| year');
$GLOBALS['LANG'] = $languageServiceProphecy->reveal(); $GLOBALS['LANG'] = $languageServiceProphecy->reveal();
...@@ -465,7 +464,6 @@ class BackendUtilityTest extends UnitTestCase ...@@ -465,7 +464,6 @@ class BackendUtilityTest extends UnitTestCase
*/ */
public function getProcessedValueHandlesAgeDisplayCorrectly($input, string $expected): void public function getProcessedValueHandlesAgeDisplayCorrectly($input, string $expected): void
{ {
/** @var ObjectProphecy $languageServiceProphecy */
$languageServiceProphecy = $this->prophesize(LanguageService::class); $languageServiceProphecy = $this->prophesize(LanguageService::class);
$languageServiceProphecy->sL(Argument::cetera())->willReturn(' min| hrs| days| yrs| min| hour| day| year'); $languageServiceProphecy->sL(Argument::cetera())->willReturn(' min| hrs| days| yrs| min| hour| day| year');
$GLOBALS['LANG'] = $languageServiceProphecy->reveal(); $GLOBALS['LANG'] = $languageServiceProphecy->reveal();
......
...@@ -1696,7 +1696,6 @@ TCAdefaults.sys_note.email = ' . $this->user['email']; ...@@ -1696,7 +1696,6 @@ TCAdefaults.sys_note.email = ' . $this->user['email'];
} }
} }
if (!$uploadFolder instanceof Folder) { if (!$uploadFolder instanceof Folder) {
/** @var ResourceStorage $storage */
foreach ($this->getFileStorages() as $storage) { foreach ($this->getFileStorages() as $storage) {
if ($storage->isWritable()) { if ($storage->isWritable()) {
try { try {
......
...@@ -2800,7 +2800,6 @@ class DataHandler implements LoggerAwareInterface ...@@ -2800,7 +2800,6 @@ class DataHandler implements LoggerAwareInterface
$tables = $type === 'group' ? $tcaFieldConf['allowed'] : $tcaFieldConf['foreign_table']; $tables = $type === 'group' ? $tcaFieldConf['allowed'] : $tcaFieldConf['foreign_table'];
$prep = $type === 'group' ? ($tcaFieldConf['prepend_tname'] ?? '') : ''; $prep = $type === 'group' ? ($tcaFieldConf['prepend_tname'] ?? '') : '';
$newRelations = implode(',', $valueArray); $newRelations = implode(',', $valueArray);
/** @var RelationHandler $dbAnalysis */
$dbAnalysis = $this->createRelationHandlerInstance(); $dbAnalysis = $this->createRelationHandlerInstance();
$dbAnalysis->registerNonTableValues = !empty($tcaFieldConf['allowNonIdValues']); $dbAnalysis->registerNonTableValues = !empty($tcaFieldConf['allowNonIdValues']);
$dbAnalysis->start($newRelations, $tables, '', 0, $currentTable, $tcaFieldConf); $dbAnalysis->start($newRelations, $tables, '', 0, $currentTable, $tcaFieldConf);
...@@ -2809,7 +2808,6 @@ class DataHandler implements LoggerAwareInterface ...@@ -2809,7 +2808,6 @@ class DataHandler implements LoggerAwareInterface
// (only required for MM relations in a workspace context) // (only required for MM relations in a workspace context)
$dbAnalysis->convertItemArray(); $dbAnalysis->convertItemArray();
if ($status === 'update') { if ($status === 'update') {
/** @var RelationHandler $oldRelations_dbAnalysis */
$oldRelations_dbAnalysis = $this->createRelationHandlerInstance(); $oldRelations_dbAnalysis = $this->createRelationHandlerInstance();
$oldRelations_dbAnalysis->registerNonTableValues = !empty($tcaFieldConf['allowNonIdValues']); $oldRelations_dbAnalysis->registerNonTableValues = !empty($tcaFieldConf['allowNonIdValues']);
// Db analysis with $id will initialize with the existing relations // Db analysis with $id will initialize with the existing relations
...@@ -3038,7 +3036,6 @@ class DataHandler implements LoggerAwareInterface ...@@ -3038,7 +3036,6 @@ class DataHandler implements LoggerAwareInterface
$foreignTable = $tcaFieldConf['foreign_table']; $foreignTable = $tcaFieldConf['foreign_table'];
$valueArray = $this->applyFiltersToValues($tcaFieldConf, $valueArray); $valueArray = $this->applyFiltersToValues($tcaFieldConf, $valueArray);
// Fetch the related child records using \TYPO3\CMS\Core\Database\RelationHandler // Fetch the related child records using \TYPO3\CMS\Core\Database\RelationHandler
/** @var RelationHandler $dbAnalysis */
$dbAnalysis = $this->createRelationHandlerInstance(); $dbAnalysis = $this->createRelationHandlerInstance();
$dbAnalysis->start(implode(',', $valueArray), $foreignTable, '', 0, $table, $tcaFieldConf); $dbAnalysis->start(implode(',', $valueArray), $foreignTable, '', 0, $table, $tcaFieldConf);
// IRRE with a pointer field (database normalization): // IRRE with a pointer field (database normalization):
...@@ -3187,7 +3184,6 @@ class DataHandler implements LoggerAwareInterface ...@@ -3187,7 +3184,6 @@ class DataHandler implements LoggerAwareInterface
} }
} }
} }
/** @var DataHandler $copyTCE */
$copyTCE = $this->getLocalTCE(); $copyTCE = $this->getLocalTCE();
$copyTCE->start($pasteDatamap, [], $this->BE_USER); $copyTCE->start($pasteDatamap, [], $this->BE_USER);
$copyTCE->process_datamap(); $copyTCE->process_datamap();
...@@ -3328,7 +3324,6 @@ class DataHandler implements LoggerAwareInterface ...@@ -3328,7 +3324,6 @@ class DataHandler implements LoggerAwareInterface
$data[$table][$theNewID][$GLOBALS['TCA'][$table]['ctrl']['origUid']] = $uid; $data[$table][$theNewID][$GLOBALS['TCA'][$table]['ctrl']['origUid']] = $uid;
} }
// Do the copy by simply submitting the array through DataHandler: // Do the copy by simply submitting the array through DataHandler:
/** @var DataHandler $copyTCE */
$copyTCE = $this->getLocalTCE(); $copyTCE = $this->getLocalTCE();
$copyTCE->start($data, [], $this->BE_USER); $copyTCE->start($data, [], $this->BE_USER);
$copyTCE->process_datamap(); $copyTCE->process_datamap();
...@@ -3828,7 +3823,6 @@ class DataHandler implements LoggerAwareInterface ...@@ -3828,7 +3823,6 @@ class DataHandler implements LoggerAwareInterface
array $workspaceOptions array $workspaceOptions
) { ) {
// Fetch the related child records using \TYPO3\CMS\Core\Database\RelationHandler // Fetch the related child records using \TYPO3\CMS\Core\Database\RelationHandler
/** @var RelationHandler $dbAnalysis */
$dbAnalysis = $this->createRelationHandlerInstance(); $dbAnalysis = $this->createRelationHandlerInstance();
$dbAnalysis->start($value, $conf['foreign_table'], '', $uid, $table, $conf); $dbAnalysis->start($value, $conf['foreign_table'], '', $uid, $table, $conf);
// Walk through the items, copy them and remember the new id: // Walk through the items, copy them and remember the new id:
...@@ -4678,7 +4672,6 @@ class DataHandler implements LoggerAwareInterface ...@@ -4678,7 +4672,6 @@ class DataHandler implements LoggerAwareInterface
$removeArray = []; $removeArray = [];
$mmTable = $inlineSubType === 'mm' && isset($config['MM']) && $config['MM'] ? $config['MM'] : ''; $mmTable = $inlineSubType === 'mm' && isset($config['MM']) && $config['MM'] ? $config['MM'] : '';
// Fetch children from original language parent: // Fetch children from original language parent:
/** @var RelationHandler $dbAnalysisOriginal */
$dbAnalysisOriginal = $this->createRelationHandlerInstance(); $dbAnalysisOriginal = $this->createRelationHandlerInstance();
$dbAnalysisOriginal->start($transOrigRecord[$field], $foreignTable, $mmTable, $transOrigRecord['uid'], $table, $config); $dbAnalysisOriginal->start($transOrigRecord[$field], $foreignTable, $mmTable, $transOrigRecord['uid'], $table, $config);
$elementsOriginal = []; $elementsOriginal = [];
...@@ -4687,7 +4680,6 @@ class DataHandler implements LoggerAwareInterface ...@@ -4687,7 +4680,6 @@ class DataHandler implements LoggerAwareInterface
} }
unset($dbAnalysisOriginal); unset($dbAnalysisOriginal);
// Fetch children from current localized parent: // Fetch children from current localized parent:
/** @var RelationHandler $dbAnalysisCurrent */
$dbAnalysisCurrent = $this->createRelationHandlerInstance(); $dbAnalysisCurrent = $this->createRelationHandlerInstance();
$dbAnalysisCurrent->start($parentRecord[$field], $foreignTable, $mmTable, $id, $table, $config); $dbAnalysisCurrent->start($parentRecord[$field], $foreignTable, $mmTable, $id, $table, $config);
// Perform synchronization: Possibly removal of already localized records: // Perform synchronization: Possibly removal of already localized records:
...@@ -5250,7 +5242,6 @@ class DataHandler implements LoggerAwareInterface ...@@ -5250,7 +5242,6 @@ class DataHandler implements LoggerAwareInterface
if ($foreign_table) { if ($foreign_table) {
$inlineType = $this->getInlineFieldType($conf); $inlineType = $this->getInlineFieldType($conf);
if ($inlineType === 'list' || $inlineType === 'field') { if ($inlineType === 'list' || $inlineType === 'field') {
/** @var RelationHandler $dbAnalysis */
$dbAnalysis = $this->createRelationHandlerInstance(); $dbAnalysis = $this->createRelationHandlerInstance();
$dbAnalysis->start($value, $conf['foreign_table'], '', $uid, $table, $conf); $dbAnalysis->start($value, $conf['foreign_table'], '', $uid, $table, $conf);
$dbAnalysis->undeleteRecord = true; $dbAnalysis->undeleteRecord = true;
...@@ -6281,7 +6272,6 @@ class DataHandler implements LoggerAwareInterface ...@@ -6281,7 +6272,6 @@ class DataHandler implements LoggerAwareInterface
if ($inlineType === 'mm') { if ($inlineType === 'mm') {
$this->remapListedDBRecords_procDBRefs($conf, $value, $theUidToUpdate, $table); $this->remapListedDBRecords_procDBRefs($conf, $value, $theUidToUpdate, $table);
} elseif ($inlineType !== false) { } elseif ($inlineType !== false) {
/** @var RelationHandler $dbAnalysis */
$dbAnalysis = $this->createRelationHandlerInstance(); $dbAnalysis = $this->createRelationHandlerInstance();
$dbAnalysis->start($value, $conf['foreign_table'], '', 0, $table, $conf); $dbAnalysis->start($value, $conf['foreign_table'], '', 0, $table, $conf);
...@@ -8641,7 +8631,6 @@ class DataHandler implements LoggerAwareInterface ...@@ -8641,7 +8631,6 @@ class DataHandler implements LoggerAwareInterface
} }
} }
/** @var CacheManager $cacheManager */
$cacheManager = $this->getCacheManager(); $cacheManager = $this->getCacheManager();
$cacheManager->flushCachesInGroupByTags('pages', array_keys($tagsToClear)); $cacheManager->flushCachesInGroupByTags('pages', array_keys($tagsToClear));
......
...@@ -19,7 +19,6 @@ use TYPO3\CMS\Backend\Utility\BackendUtility; ...@@ -19,7 +19,6 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\DataHandling\DataHandler; use TYPO3\CMS\Core\DataHandling\DataHandler;
use TYPO3\CMS\Core\Localization\LanguageService; use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Messaging\FlashMessage; use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
use TYPO3\CMS\Core\Messaging\FlashMessageService; use TYPO3\CMS\Core\Messaging\FlashMessageService;
use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\GeneralUtility;
...@@ -57,7 +56,6 @@ class BackendUserGroupIntegrityCheck ...@@ -57,7 +56,6 @@ class BackendUserGroupIntegrityCheck
); );
/** @var FlashMessageService $flashMessageService */ /** @var FlashMessageService $flashMessageService */
$flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
/** @var FlashMessageQueue $defaultFlashMessageQueue */
$defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier(); $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
$defaultFlashMessageQueue->enqueue($flashMessage); $defaultFlashMessageQueue->enqueue($flashMessage);
} }
......
...@@ -822,7 +822,6 @@ class PackageManager implements SingletonInterface ...@@ -822,7 +822,6 @@ class PackageManager implements SingletonInterface
throw new InvalidPackageStateException('Package "' . $packageKey . '" is not registered.', 1436201329); throw new InvalidPackageStateException('Package "' . $packageKey . '" is not registered.', 1436201329);
} }
/** @var PackageInterface $package */
$package = $this->packages[$packageKey]; $package = $this->packages[$packageKey];
$packagePath = $package->getPackagePath(); $packagePath = $package->getPackagePath();
$newPackage = new Package($this, $packageKey, $packagePath); $newPackage = new Package($this, $packageKey, $packagePath);
......
...@@ -65,7 +65,6 @@ class ExtractorRegistry implements SingletonInterface ...@@ -65,7 +65,6 @@ class ExtractorRegistry implements SingletonInterface
$extractors = array_reverse($this->extractors); $extractors = array_reverse($this->extractors);
foreach ($extractors as $className) { foreach ($extractors as $className) {
/** @var ExtractorInterface $object */
$object = $this->createExtractorInstance($className); $object = $this->createExtractorInstance($className);
$this->instances[] = $object; $this->instances[] = $object;
} }
......
...@@ -119,7 +119,6 @@ final class FileDeletionAspect ...@@ -119,7 +119,6 @@ final class FileDeletionAspect
return; return;
} }
/** @var \TYPO3\CMS\Core\Resource\ProcessedFile $processedFile */
foreach ($this->getProcessedFileRepository()->findAllByOriginalFile($fileObject) as $processedFile) { foreach ($this->getProcessedFileRepository()->findAllByOriginalFile($fileObject) as $processedFile) {
if ($processedFile->exists()) { if ($processedFile->exists()) {
$processedFile->delete(true); $processedFile->delete(true);
......
...@@ -70,7 +70,6 @@ class RendererRegistry implements SingletonInterface ...@@ -70,7 +70,6 @@ class RendererRegistry implements SingletonInterface
// priority in the same order as they were added to the registry. // priority in the same order as they were added to the registry.
$classNames = array_reverse($this->classNames); $classNames = array_reverse($this->classNames);
foreach ($classNames as $className) { foreach ($classNames as $className) {
/** @var FileRendererInterface $object */
$object = $this->createRendererInstance($className); $object = $this->createRendererInstance($className);
$this->instances[] = $object; $this->instances[] = $object;
} }
...@@ -118,7 +117,6 @@ class RendererRegistry implements SingletonInterface ...@@ -118,7 +117,6 @@ class RendererRegistry implements SingletonInterface
{ {
$matchingFileRenderer = null; $matchingFileRenderer = null;
/** @var FileRendererInterface $fileRenderer */
foreach ($this->getRendererInstances() as $fileRenderer) { foreach ($this->getRendererInstances() as $fileRenderer) {
if ($fileRenderer->canRender($file)) { if ($fileRenderer->canRender($file)) {
$matchingFileRenderer = $fileRenderer; $matchingFileRenderer = $fileRenderer;
......
...@@ -1205,7 +1205,6 @@ class ExtendedFileUtility extends BasicFileUtility ...@@ -1205,7 +1205,6 @@ class ExtendedFileUtility extends BasicFileUtility
/** @var FlashMessageService $flashMessageService */ /** @var FlashMessageService $flashMessageService */
$flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
/** @var \TYPO3\CMS\Core\Messaging\FlashMessageQueue $defaultFlashMessageQueue */
$defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier(); $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
$defaultFlashMessageQueue->enqueue($flashMessage); $defaultFlashMessageQueue->enqueue($flashMessage);
} }
......
...@@ -157,7 +157,6 @@ class LogRecordTest extends UnitTestCase ...@@ -157,7 +157,6 @@ class LogRecordTest extends UnitTestCase
$level = LogLevel::DEBUG; $level = LogLevel::DEBUG;
$message = 'test message'; $message = 'test message';
$data = ['foo' => 'bar']; $data = ['foo' => 'bar'];
/** @var $record LogRecord */
$record = new LogRecord($component, $level, $message, $data); $record = new LogRecord($component, $level, $message, $data);
$recordArray = $record->toArray(); $recordArray = $record->toArray();
self::assertEquals($component, $recordArray['component']); self::assertEquals($component, $recordArray['component']);
......
...@@ -1402,7 +1402,6 @@ class LocalDriverTest extends BaseTestCase ...@@ -1402,7 +1402,6 @@ class LocalDriverTest extends BaseTestCase
'targetFolder' => [], 'targetFolder' => [],
]); ]);
$subject = $this->createDriver(); $subject = $this->createDriver();
/** @var LocalDriver $subject */
$subject->moveFolderWithinStorage('/sourceFolder/', '/targetFolder/', 'someFolder'); $subject->moveFolderWithinStorage('/sourceFolder/', '/targetFolder/', 'someFolder');
self::assertFileExists($this->getUrlInMount('/targetFolder/someFolder/')); self::assertFileExists($this->getUrlInMount('/targetFolder/someFolder/'));
self::assertEquals($fileContents, file_get_contents($this->getUrlInMount('/targetFolder/someFolder/file'))); self::assertEquals($fileContents, file_get_contents($this->getUrlInMount('/targetFolder/someFolder/file')));
......
...@@ -546,7 +546,6 @@ class ResourceStorageTest extends BaseTestCase ...@@ -546,7 +546,6 @@ class ResourceStorageTest extends BaseTestCase
$mockedDriver = $this->createDriverMock([], $this->subject, ['renameFile']); $mockedDriver = $this->createDriverMock([], $this->subject, ['renameFile']);
$mockedDriver->expects(self::once())->method('renameFile')->willReturn('bar'); $mockedDriver->expects(self::once())->method('renameFile')->willReturn('bar');
$this->prepareSubject([], true, $mockedDriver, null); $this->prepareSubject([], true, $mockedDriver, null);
/** @var File $file */
$file = new File(['identifier' => 'foo', 'name' => 'foo'], $this->subject); $file = new File(['identifier' => 'foo', 'name' => 'foo'], $this->subject);
$result = $this->subject->renameFile($file, 'bar'); $result = $this->subject->renameFile($file, 'bar');
// fake what the indexer does in updateIndexEntry // fake what the indexer does in updateIndexEntry
...@@ -577,7 +576,6 @@ class ResourceStorageTest extends BaseTestCase ...@@ -577,7 +576,6 @@ class ResourceStorageTest extends BaseTestCase
['getUniqueName', 'createFolderObject'] ['getUniqueName', 'createFolderObject']
); );
$this->subject->expects(self::once())->method('createFolderObject')->willReturn(new Folder($this->subject, '', '')); $this->subject->expects(self::once())->method('createFolderObject')->willReturn(new Folder($this->subject, '', ''));
/** @var File $file */
$file = new File(['identifier' => 'foo', 'name' => 'foo'], $this->subject); $file = new File(['identifier' => 'foo', 'name' => 'foo'], $this->subject);
$this->subject->method('getUniqueName')->willReturn('bar_01'); $this->subject->method('getUniqueName')->willReturn('bar_01');
$result = $this->subject->renameFile($file, 'bar'); $result = $this->subject->renameFile($file, 'bar');
...@@ -597,7 +595,6 @@ class ResourceStorageTest extends BaseTestCase ...@@ -597,7 +595,6 @@ class ResourceStorageTest extends BaseTestCase
1489593099 1489593099
))); )));
$this->prepareSubject([], true, $mockedDriver); $this->prepareSubject([], true, $mockedDriver);
/** @var File $file */
$file = new File(['identifier' => 'foo', 'name' => 'foo'], $this->subject); $file = new File(['identifier' => 'foo', 'name' => 'foo'], $this->subject);
$this->expectException(ExistingTargetFileNameException::class); $this->expectException(ExistingTargetFileNameException::class);
$this->subject->renameFile($file, 'bar', DuplicationBehavior::CANCEL); $this->subject->renameFile($file, 'bar', DuplicationBehavior::CANCEL);
...@@ -623,7 +620,6 @@ class ResourceStorageTest extends BaseTestCase ...@@ -623,7 +620,6 @@ class ResourceStorageTest extends BaseTestCase
$file = $this->prophesize(FileInterface::class); $file = $this->prophesize(FileInterface::class);
$resourceFactory->getFileObjectFromCombinedIdentifier(Argument::any())->willReturn($file->reveal()); $resourceFactory->getFileObjectFromCombinedIdentifier(Argument::any())->willReturn($file->reveal());
$this->subject->expects(self::once())->method('replaceFile')->willReturn($file->reveal()); $this->subject->expects(self::once())->method('replaceFile')->willReturn($file->reveal());
/** @var File $file */
$file = new File(['identifier' => 'foo', 'name' => 'foo', 'missing' => false], $this->subject); $file = new File(['identifier' => 'foo', 'name' => 'foo', 'missing' => false], $this->subject);
$this->subject->renameFile($file, 'bar', DuplicationBehavior::REPLACE); $this->subject->renameFile($file, 'bar', DuplicationBehavior::REPLACE);
} }
......
...@@ -110,7 +110,6 @@ class DashboardInitializationService ...@@ -110,7 +110,6 @@ class DashboardInitializationService
$userConfig['options.']['dashboard.']['dashboardPresetsForNewUsers'] ?? 'default' $userConfig['options.']['dashboard.']['dashboardPresetsForNewUsers'] ?? 'default'
); );
/** @var DashboardPreset $dashboardPreset */
foreach ($this->dashboardPresetRegistry->getDashboardPresets() as $dashboardPreset) { foreach ($this->dashboardPresetRegistry->getDashboardPresets() as $dashboardPreset) {
if (in_array($dashboardPreset->getIdentifier(), $dashboardsToCreate, true)) { if (in_array($dashboardPreset->getIdentifier(), $dashboardsToCreate, true)) {
$dashboard = $this->dashboardRepository->create( $dashboard = $this->dashboardRepository->create(
......
...@@ -338,8 +338,6 @@ class ClassSchema ...@@ -338,8 +338,6 @@ class ClassSchema
$docComment = is_string($docComment) ? $docComment : ''; $docComment = is_string($docComment) ? $docComment : '';
foreach ($reflectionMethod->getParameters() as $parameterPosition => $reflectionParameter) { foreach ($reflectionMethod->getParameters() as $parameterPosition => $reflectionParameter) {
/* @var \ReflectionParameter $reflectionParameter */
$parameterName = $reflectionParameter->getName(); $parameterName = $reflectionParameter->getName();
$ignoreValidationParameters = array_filter($annotations, static function ($annotation) use ($parameterName) { $ignoreValidationParameters = array_filter($annotations, static function ($annotation) use ($parameterName) {
......
...@@ -22,7 +22,6 @@ use Psr\Http\Message\ResponseInterface; ...@@ -22,7 +22,6 @@ use Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Extbase\Annotation as Extbase; use TYPO3\CMS\Extbase\Annotation as Extbase;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Extbase\Mvc\Controller\Arguments; use TYPO3\CMS\Extbase\Mvc\Controller\Arguments;
use TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfiguration;
use TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter; use TYPO3\CMS\Extbase\Property\TypeConverter\PersistentObjectConverter;
/** /**
...@@ -37,7 +36,6 @@ class TestController extends ActionController ...@@ -37,7 +36,6 @@ class TestController extends ActionController
public function initializeFooAction(): void public function initializeFooAction(): void
{ {
/** @var MvcPropertyMappingConfiguration $propertyMappingConfiguration */
$propertyMappingConfiguration = $this->arguments['fooParam']->getPropertyMappingConfiguration(); $propertyMappingConfiguration = $this->arguments['fooParam']->getPropertyMappingConfiguration();
$propertyMappingConfiguration->allowAllProperties(); $propertyMappingConfiguration->allowAllProperties();
$propertyMappingConfiguration->setTypeConverterOption( $propertyMappingConfiguration->setTypeConverterOption(
......
...@@ -223,7 +223,6 @@ class RelationTest extends FunctionalTestCase ...@@ -223,7 +223,6 @@ class RelationTest extends FunctionalTestCase
->execute() ->execute()
->fetchOne(); ->fetchOne();
/** @var Post $newPost */
$newPost = new Post(); $newPost = new Post();
$posts = clone $this->blog->getPosts(); $posts = clone $this->blog->getPosts();
......
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