[TASK] Include all classes via use statements in ext:backend 87/64187/4
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Wed, 15 Apr 2020 16:28:08 +0000 (18:28 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Fri, 17 Apr 2020 09:47:24 +0000 (11:47 +0200)
This patch has been created with rector and php-cs-fixer

    bin/rector process --set=php53 typo3/sysext/backend/Classes
    bin/rector process --set=php53 typo3/sysext/backend/Tests

Releases: master
Resolves: #91064
Change-Id: I9e91882ab233b0e34bc991fd348fceba197a91ea
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64187
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
61 files changed:
typo3/sysext/backend/Classes/Clipboard/Clipboard.php
typo3/sysext/backend/Classes/Configuration/TsConfigParser.php
typo3/sysext/backend/Classes/ContextMenu/ContextMenu.php
typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/File/ThumbnailController.php
typo3/sysext/backend/Classes/Controller/Wizard/EditController.php
typo3/sysext/backend/Classes/Domain/Repository/Module/BackendModuleRepository.php
typo3/sysext/backend/Classes/Form/Container/InlineRecordContainer.php
typo3/sysext/backend/Classes/Form/FieldControl/AddRecord.php
typo3/sysext/backend/Classes/Form/FieldControl/EditPopup.php
typo3/sysext/backend/Classes/Form/FieldControl/LinkPopup.php
typo3/sysext/backend/Classes/Form/FieldControl/ListModule.php
typo3/sysext/backend/Classes/Form/FieldControl/TableWizard.php
typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php
typo3/sysext/backend/Classes/Form/FormResultCompiler.php
typo3/sysext/backend/Classes/FrontendBackendUserAuthentication.php
typo3/sysext/backend/Classes/Module/ModuleLoader.php
typo3/sysext/backend/Classes/Module/ModuleStorage.php
typo3/sysext/backend/Classes/Provider/PageTsBackendLayoutDataProvider.php
typo3/sysext/backend/Classes/Routing/Exception/InvalidRequestTokenException.php
typo3/sysext/backend/Classes/Routing/Exception/ResourceNotFoundException.php
typo3/sysext/backend/Classes/Routing/Router.php
typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php
typo3/sysext/backend/Classes/ServiceProvider.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/Template/ModuleTemplate.php
typo3/sysext/backend/Classes/Tree/AbstractTree.php
typo3/sysext/backend/Classes/Tree/AbstractTreeDataProvider.php
typo3/sysext/backend/Classes/Tree/Renderer/AbstractTreeRenderer.php
typo3/sysext/backend/Classes/Tree/Renderer/UnorderedListTreeRenderer.php
typo3/sysext/backend/Classes/Tree/SortedTreeNodeCollection.php
typo3/sysext/backend/Classes/Tree/TreeNode.php
typo3/sysext/backend/Classes/Tree/TreeNodeCollection.php
typo3/sysext/backend/Classes/Tree/TreeRepresentationNode.php
typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/View/BackendLayout/BackendLayout.php
typo3/sysext/backend/Classes/View/BackendLayout/DataProviderCollection.php
typo3/sysext/backend/Classes/View/BackendLayout/DataProviderContext.php
typo3/sysext/backend/Classes/View/BackendLayout/DefaultDataProvider.php
typo3/sysext/backend/Classes/View/BackendLayout/Grid/Grid.php
typo3/sysext/backend/Classes/View/BackendLayoutView.php
typo3/sysext/backend/Classes/View/BackendTemplateView.php
typo3/sysext/backend/Classes/View/PageLayoutViewDrawFooterHookInterface.php
typo3/sysext/backend/Classes/View/PageLayoutViewDrawItemHookInterface.php
typo3/sysext/backend/Tests/Functional/Domain/Repository/Localization/LocalizationRepositoryTest.php
typo3/sysext/backend/Tests/Unit/Controller/File/FileControllerTest.php
typo3/sysext/backend/Tests/Unit/Controller/File/ThumbnailControllerTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaFlexProcessTest.php
typo3/sysext/backend/Tests/Unit/Tree/SortedTreeNodeCollectionTest.php
typo3/sysext/backend/Tests/Unit/Tree/TreeNodeCollectionTest.php
typo3/sysext/backend/Tests/Unit/Utility/BackendUtilityTest.php
typo3/sysext/backend/Tests/Unit/Utility/Fixtures/LabelFromItemListMergedReturnsCorrectFieldsFixture.php
typo3/sysext/backend/Tests/Unit/Utility/Fixtures/ProcessedValueForGroupWithMultipleAllowedTablesFixture.php
typo3/sysext/backend/Tests/Unit/Utility/Fixtures/ProcessedValueForGroupWithOneAllowedTableFixture.php
typo3/sysext/backend/Tests/Unit/Utility/Fixtures/ProcessedValueForSelectWithMMRelationFixture.php
typo3/sysext/backend/Tests/Unit/View/BackendLayout/BackendLayoutCollectionTest.php
typo3/sysext/backend/Tests/Unit/View/BackendLayout/BackendLayoutTest.php
typo3/sysext/backend/Tests/Unit/View/BackendLayout/DataProviderCollectionTest.php
typo3/sysext/backend/Tests/Unit/View/BackendLayoutViewTest.php

index 3282d31..7abcff5 100644 (file)
@@ -23,6 +23,9 @@ use TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Resource\AbstractFile;
+use TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException;
+use TYPO3\CMS\Core\Resource\Folder;
+use TYPO3\CMS\Core\Resource\ProcessedFile;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Type\Bitmask\JsConfirmation;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
@@ -384,11 +387,11 @@ class Clipboard
                         $fileObject = GeneralUtility::makeInstance(ResourceFactory::class)->retrieveFileOrFolderObject($v);
                         if ($fileObject) {
                             $thumb = [];
-                            $folder = $fileObject instanceof \TYPO3\CMS\Core\Resource\Folder;
+                            $folder = $fileObject instanceof Folder;
                             $size = $folder ? '' : '(' . GeneralUtility::formatSize($fileObject->getSize()) . 'bytes)';
                             if (!$folder && $fileObject->isImage()) {
                                 $thumb = [
-                                    'image' => $fileObject->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW, [])->getPublicUrl(true),
+                                    'image' => $fileObject->process(ProcessedFile::CONTEXT_IMAGEPREVIEW, [])->getPublicUrl(true),
                                     'title' => htmlspecialchars($fileObject->getName())
                                 ];
                             }
@@ -834,7 +837,7 @@ class Clipboard
                     } else {
                         try {
                             GeneralUtility::makeInstance(ResourceFactory::class)->retrieveFileOrFolderObject($v);
-                        } catch (\TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException $e) {
+                        } catch (ResourceDoesNotExistException $e) {
                             // The file has been deleted in the meantime, so just remove it silently
                             unset($this->clipData[$this->current]['el'][$k]);
                         }
index 40a882b..220b5be 100644 (file)
@@ -15,7 +15,9 @@
 
 namespace TYPO3\CMS\Backend\Configuration;
 
+use TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher;
 use TYPO3\CMS\Core\Cache\CacheManager;
+use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -23,7 +25,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  *
  * @deprecated Should not be used anymore. See the PageTsConfigParser class, which has a more straightforward API. This class will be removed in TYPO3 v11.0.
  */
-class TsConfigParser extends \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
+class TsConfigParser extends TypoScriptParser
 {
     /**
      * @var array
@@ -119,7 +121,7 @@ class TsConfigParser extends \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
     protected function parseWithConditions($TSconfig)
     {
         /** @var \TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher $matchObj */
-        $matchObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::class);
+        $matchObj = GeneralUtility::makeInstance(ConditionMatcher::class);
         $matchObj->setRootline($this->rootLine);
         $matchObj->setPageId($this->id);
         $this->parse($TSconfig, $matchObj);
@@ -140,7 +142,7 @@ class TsConfigParser extends \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser
     {
         if (is_array($cc['sections'])) {
             /** @var \TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher $matchObj */
-            $matchObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::class);
+            $matchObj = GeneralUtility::makeInstance(ConditionMatcher::class);
             $matchObj->setRootline($this->rootLine);
             $matchObj->setPageId($this->id);
             foreach ($cc['sections'] as $key => $pre) {
index f635259..2bf7369 100644 (file)
@@ -17,6 +17,8 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Backend\ContextMenu;
 
+use TYPO3\CMS\Backend\ContextMenu\ItemProviders\PageProvider;
+use TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -31,8 +33,8 @@ class ContextMenu
      * @var array
      */
     protected $itemProviders = [
-        ItemProviders\PageProvider::class,
-        ItemProviders\RecordProvider::class
+        PageProvider::class,
+        RecordProvider::class
     ];
 
     /**
index 19f5995..b17a312 100644 (file)
@@ -23,6 +23,7 @@ use TYPO3\CMS\Backend\Template\ModuleTemplate;
 use TYPO3\CMS\Backend\Tree\View\ContentMovingPagePositionMap;
 use TYPO3\CMS\Backend\Tree\View\PageMovingPagePositionMap;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\View\BackendLayoutView;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Http\HtmlResponse;
 use TYPO3\CMS\Core\Imaging\Icon;
@@ -201,7 +202,7 @@ class MoveElementController
                     $assigns['ttContent']['pageInfo'] = $pageInfo;
                     $assigns['ttContent']['recordTooltip'] = BackendUtility::getRecordToolTip($pageInfo, 'pages');
                     $assigns['ttContent']['recordTitle'] = BackendUtility::getRecordTitle('pages', $pageInfo, true);
-                    $colPosArray = GeneralUtility::callUserFunction(\TYPO3\CMS\Backend\View\BackendLayoutView::class . '->getColPosListItemsParsed', $this->page_id, $this);
+                    $colPosArray = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getColPosListItemsParsed', $this->page_id, $this);
                     $colPosIds = [];
                     foreach ($colPosArray as $colPos) {
                         $colPosIds[] = $colPos[1];
index 0a4389b..b72eaf2 100644 (file)
@@ -734,9 +734,11 @@ class EditDocumentController
         }
         // If a preview is requested
         if (isset($parsedBody['_savedokview'])) {
+            $array_keys = array_keys($this->data);
             // Get the first table and id of the data array from DataHandler
-            $table = reset(array_keys($this->data));
-            $id = reset(array_keys($this->data[$table]));
+            $table = reset($array_keys);
+            $array_keys = array_keys($this->data[$table]);
+            $id = reset($array_keys);
             if (!MathUtility::canBeInterpretedAsInteger($id)) {
                 $id = $tce->substNEWwithIDs[$id];
             }
index 192fdba..634ca00 100644 (file)
@@ -21,6 +21,7 @@ use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use TYPO3\CMS\Core\Http\Response;
 use TYPO3\CMS\Core\Imaging\IconRegistry;
+use TYPO3\CMS\Core\Resource\Exception;
 use TYPO3\CMS\Core\Resource\ProcessedFile;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
@@ -52,7 +53,7 @@ class ThumbnailController
                 $parameters['fileId'] ?? null,
                 $parameters['configuration'] ?? []
             );
-        } catch (\TYPO3\CMS\Core\Resource\Exception $exception) {
+        } catch (Exception $exception) {
             // catch and handle only resource related exceptions
             $response = $this->generateNotFoundResponse();
         }
index 2cefaf4..13c9ed6 100644 (file)
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Backend\Controller\Wizard;
 
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools;
 use TYPO3\CMS\Core\Database\RelationHandler;
 use TYPO3\CMS\Core\Http\HtmlResponse;
@@ -118,7 +119,7 @@ class EditController extends AbstractWizardController
             }
         }
 
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
         $urlParameters = [
             'returnUrl' => (string)$uriBuilder->buildUriFromRoute('wizard_edit', ['doClose' => 1])
         ];
index 79dab52..afd5611 100644 (file)
@@ -17,18 +17,20 @@ namespace TYPO3\CMS\Backend\Domain\Repository\Module;
 
 use TYPO3\CMS\Backend\Domain\Model\Module\BackendModule;
 use TYPO3\CMS\Backend\Module\ModuleLoader;
+use TYPO3\CMS\Backend\Module\ModuleStorage;
 use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Imaging\IconRegistry;
 use TYPO3\CMS\Core\Localization\LanguageService;
+use TYPO3\CMS\Core\SingletonInterface;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Repository for backend module menu
  * compiles all data from $GLOBALS[TBE_MODULES]
  */
-class BackendModuleRepository implements \TYPO3\CMS\Core\SingletonInterface
+class BackendModuleRepository implements SingletonInterface
 {
     /**
      * @var \TYPO3\CMS\Backend\Module\ModuleStorage
@@ -40,7 +42,7 @@ class BackendModuleRepository implements \TYPO3\CMS\Core\SingletonInterface
      */
     public function __construct()
     {
-        $this->moduleStorage = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Module\ModuleStorage::class);
+        $this->moduleStorage = GeneralUtility::makeInstance(ModuleStorage::class);
 
         $rawData = $this->getRawModuleMenuData();
 
@@ -152,7 +154,7 @@ class BackendModuleRepository implements \TYPO3\CMS\Core\SingletonInterface
     protected function createEntryFromRawData(array $module)
     {
         /** @var \TYPO3\CMS\Backend\Domain\Model\Module\BackendModule $entry */
-        $entry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Domain\Model\Module\BackendModule::class);
+        $entry = GeneralUtility::makeInstance(BackendModule::class);
         if (!empty($module['name']) && is_string($module['name'])) {
             $entry->setName($module['name']);
         }
index e60cf1e..9e279f7 100644 (file)
@@ -19,6 +19,7 @@ use TYPO3\CMS\Backend\Form\Element\InlineElementHookInterface;
 use TYPO3\CMS\Backend\Form\Exception\AccessDeniedContentEditException;
 use TYPO3\CMS\Backend\Form\InlineStackProcessor;
 use TYPO3\CMS\Backend\Form\NodeFactory;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Database\ConnectionPool;
@@ -540,7 +541,7 @@ class InlineRecordContainer extends AbstractContainer
                     ->execute()
                     ->fetch();
                 if (!empty($recordInDatabase)) {
-                    $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+                    $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
                     $url = (string)$uriBuilder->buildUriFromRoute('record_edit', [
                         'edit[sys_file_metadata][' . (int)$recordInDatabase['uid'] . ']' => 'edit',
                         'returnUrl' => $this->data['returnUrl']
index 53af4c1..8769175 100644 (file)
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Backend\Form\FieldControl;
 
 use TYPO3\CMS\Backend\Form\AbstractNode;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\StringUtility;
 
@@ -102,7 +103,7 @@ class AddRecord extends AbstractNode
         $id = StringUtility::getUniqueId('t3js-formengine-fieldcontrol-');
 
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
         return [
             'iconIdentifier' => 'actions-add',
             'title' => $title,
index bfc446b..31e2a13 100644 (file)
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Backend\Form\FieldControl;
 
 use TYPO3\CMS\Backend\Form\AbstractNode;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\StringUtility;
@@ -80,7 +81,7 @@ class EditPopup extends AbstractNode
                 'fieldChangeFuncHash' => GeneralUtility::hmac(serialize($parameterArray['fieldChangeFunc'])),
             ],
         ];
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
         $url = (string)$uriBuilder->buildUriFromRoute('wizard_edit', $urlParameters);
 
         $id = StringUtility::getUniqueId('t3js-formengine-fieldcontrol-');
index 50cb294..932185b 100644 (file)
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Backend\Form\FieldControl;
 
 use TYPO3\CMS\Backend\Form\AbstractNode;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\StringUtility;
 
@@ -66,7 +67,7 @@ class LinkPopup extends AbstractNode
             ],
         ];
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
         $url = (string)$uriBuilder->buildUriFromRoute('wizard_link', $urlParameters);
 
         $id = StringUtility::getUniqueId('t3js-formengine-fieldcontrol-');
index f1ac50a..2fb2555 100644 (file)
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Backend\Form\FieldControl;
 
 use TYPO3\CMS\Backend\Form\AbstractNode;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\StringUtility;
 
@@ -88,7 +89,7 @@ class ListModule extends AbstractNode
         $id = StringUtility::getUniqueId('t3js-formengine-fieldcontrol-');
 
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
 
         return [
             'iconIdentifier' => 'actions-system-list-open',
index f4eb033..5b9548f 100644 (file)
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Backend\Form\FieldControl;
 
 use TYPO3\CMS\Backend\Form\AbstractNode;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Core\Utility\StringUtility;
@@ -72,7 +73,7 @@ class TableWizard extends AbstractNode
         $id = StringUtility::getUniqueId('t3js-formengine-fieldcontrol-');
 
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
         return [
             'iconIdentifier' => 'content-table',
             'title' => $title,
index 5406b1f..a767f3f 100644 (file)
@@ -33,6 +33,7 @@ use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Messaging\FlashMessageService;
 use TYPO3\CMS\Core\Resource\FileRepository;
+use TYPO3\CMS\Core\Resource\ResourceStorage;
 use TYPO3\CMS\Core\Site\SiteFinder;
 use TYPO3\CMS\Core\Type\Bitmask\Permission;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
@@ -731,7 +732,7 @@ abstract class AbstractItemProvider
         }
 
         $allowedStorageIds = array_map(
-            function (\TYPO3\CMS\Core\Resource\ResourceStorage $storage) {
+            function (ResourceStorage $storage) {
                 return $storage->getUid();
             },
             $this->getBackendUser()->getFileStorages()
@@ -1329,7 +1330,7 @@ abstract class AbstractItemProvider
             }
             $value = strlen((string)$item[1]) > 0 ? $item[1] : '';
             $icon = !empty($item[2]) ? $item[2] : null;
-            $groupId = isset($item[3]) ? $item[3] : null;
+            $groupId = $item[3] ?? null;
             $helpText = null;
             if (!empty($item[4])) {
                 if (\is_string($item[4])) {
index 0107b57..c16be20 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Backend\Form;
 
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
@@ -182,7 +183,7 @@ class FormResultCompiler
     {
         $pageRenderer = $this->getPageRenderer();
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
 
         // @todo: this is messy here - "additional hidden fields" should be handled elsewhere
         $html = implode(LF, $this->hiddenFieldAccum);
index 7acb1a5..9621011 100644 (file)
@@ -91,7 +91,6 @@ class FrontendBackendUserAuthentication extends BackendUserAuthentication
     /**
      * Edit Access
      */
-
     /**
      * Checks whether the user has access to edit the language for the
      * requested record.
index 2b76462..6bea2e2 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Backend\Module;
 
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -156,7 +157,7 @@ class ModuleLoader
         // Language processing. This will add module labels and image reference to the internal ->moduleLabels array of the LANG object.
         $this->addLabelsForModule($name, $finalModuleConfiguration['labels'] ?? $setupInformation['labels']);
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
-        $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
         if (isset($setupInformation['configuration']['routeTarget'])) {
             $finalModuleConfiguration['script'] = (string)$uriBuilder->buildUriFromRoute($name);
         } else {
index 8cb1d2b..e6e0166 100644 (file)
 namespace TYPO3\CMS\Backend\Module;
 
 use TYPO3\CMS\Backend\Domain\Model\Module\BackendModule;
+use TYPO3\CMS\Core\SingletonInterface;
 
 /**
  * Model for the module storage
  */
-class ModuleStorage implements \TYPO3\CMS\Core\SingletonInterface
+class ModuleStorage implements SingletonInterface
 {
     /**
      * @var \SplObjectStorage
index 2f70b3d..d70c015 100644 (file)
@@ -20,6 +20,7 @@ use TYPO3\CMS\Backend\View\BackendLayout\BackendLayout;
 use TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection;
 use TYPO3\CMS\Backend\View\BackendLayout\DataProviderContext;
 use TYPO3\CMS\Backend\View\BackendLayout\DataProviderInterface;
+use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -177,7 +178,7 @@ class PageTsBackendLayoutDataProvider implements DataProviderInterface
             $backendLayout['title'] = $data['title'] ?: $backendLayout['uid'];
             $backendLayout['icon'] = $data['icon'] ?: '';
             // Convert PHP array back to plain TypoScript so it can be processed
-            $config = \TYPO3\CMS\Core\Utility\ArrayUtility::flatten($data['config.']);
+            $config = ArrayUtility::flatten($data['config.']);
             $backendLayout['config'] = '';
             foreach ($config as $row => $value) {
                 $backendLayout['config'] .= $row . ' = ' . $value . "\r\n";
index 25119fc..4a8d0e3 100644 (file)
 
 namespace TYPO3\CMS\Backend\Routing\Exception;
 
+use TYPO3\CMS\Core\Exception;
+
 /**
  * Exception thrown when request token was invalid
  */
-class InvalidRequestTokenException extends \TYPO3\CMS\Core\Exception
+class InvalidRequestTokenException extends Exception
 {
 }
index 3dff07c..80fdf41 100644 (file)
 
 namespace TYPO3\CMS\Backend\Routing\Exception;
 
+use TYPO3\CMS\Core\Exception;
+
 /**
  * Exception thrown when a resource was not found.
  */
-class ResourceNotFoundException extends \TYPO3\CMS\Core\Exception
+class ResourceNotFoundException extends Exception
 {
 }
index 349a800..7a8520f 100644 (file)
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Backend\Routing;
 
 use Psr\Http\Message\ServerRequestInterface;
 use TYPO3\CMS\Backend\Routing\Exception\ResourceNotFoundException;
+use TYPO3\CMS\Core\SingletonInterface;
 
 /**
  * Implementation of a class for adding routes, collecting throughout the Bootstrap
@@ -29,7 +30,7 @@ use TYPO3\CMS\Backend\Routing\Exception\ResourceNotFoundException;
  *
  * The architecture is inspired by the Symfony Routing Component.
  */
-class Router implements \TYPO3\CMS\Core\SingletonInterface
+class Router implements SingletonInterface
 {
     /**
      * All routes used in the Backend
index 86b129a..d09461f 100644 (file)
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Backend\Search\LiveSearch;
 
 use TYPO3\CMS\Backend\Routing\UriBuilder;
+use TYPO3\CMS\Backend\Tree\View\PageTreeView;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
@@ -438,7 +439,7 @@ class LiveSearch
      */
     protected function getAvailablePageIds($id, $depth)
     {
-        $tree = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\View\PageTreeView::class);
+        $tree = GeneralUtility::makeInstance(PageTreeView::class);
         $tree->init('AND ' . $this->userPermissions);
         $tree->makeHTML = 0;
         $tree->fieldArray = ['uid', 'php_tree_stop'];
index 5a07228..02ccd4f 100644 (file)
@@ -19,6 +19,11 @@ namespace TYPO3\CMS\Backend;
 
 use ArrayObject;
 use Psr\Container\ContainerInterface;
+use TYPO3\CMS\Backend\Http\Application;
+use TYPO3\CMS\Backend\Http\RequestHandler;
+use TYPO3\CMS\Backend\Http\RouteDispatcher;
+use TYPO3\CMS\Backend\Routing\Route;
+use TYPO3\CMS\Backend\Routing\Router;
 use TYPO3\CMS\Core\Cache\Exception\InvalidDataException;
 use TYPO3\CMS\Core\Configuration\ConfigurationManager;
 use TYPO3\CMS\Core\Context\Context;
@@ -42,9 +47,9 @@ class ServiceProvider extends AbstractServiceProvider
     public function getFactories(): array
     {
         return [
-            Http\Application::class => [ static::class, 'getApplication' ],
-            Http\RequestHandler::class => [ static::class, 'getRequestHandler' ],
-            Http\RouteDispatcher::class => [ static::class, 'getRouteDispatcher' ],
+            Application::class => [ static::class, 'getApplication' ],
+            RequestHandler::class => [ static::class, 'getRequestHandler' ],
+            RouteDispatcher::class => [ static::class, 'getRouteDispatcher' ],
             'backend.middlewares' => [ static::class, 'getBackendMiddlewares' ],
             'backend.routes' => [ static::class, 'getBackendRoutes' ],
         ];
@@ -53,32 +58,32 @@ class ServiceProvider extends AbstractServiceProvider
     public function getExtensions(): array
     {
         return [
-            Routing\Router::class => [ static::class, 'configureBackendRouter' ],
+            Router::class => [ static::class, 'configureBackendRouter' ],
         ] + parent::getExtensions();
     }
 
-    public static function getApplication(ContainerInterface $container): Http\Application
+    public static function getApplication(ContainerInterface $container): Application
     {
         $requestHandler = new MiddlewareDispatcher(
-            $container->get(Http\RequestHandler::class),
+            $container->get(RequestHandler::class),
             $container->get('backend.middlewares'),
             $container
         );
-        return new Http\Application(
+        return new Application(
             $requestHandler,
             $container->get(ConfigurationManager::class),
             $container->get(Context::class)
         );
     }
 
-    public static function getRequestHandler(ContainerInterface $container): Http\RequestHandler
+    public static function getRequestHandler(ContainerInterface $container): RequestHandler
     {
-        return new Http\RequestHandler($container->get(Http\RouteDispatcher::class));
+        return new RequestHandler($container->get(RouteDispatcher::class));
     }
 
-    public static function getRouteDispatcher(ContainerInterface $container): Http\RouteDispatcher
+    public static function getRouteDispatcher(ContainerInterface $container): RouteDispatcher
     {
-        return self::new($container, Http\RouteDispatcher::class, [$container]);
+        return self::new($container, RouteDispatcher::class, [$container]);
     }
 
     /**
@@ -92,9 +97,9 @@ class ServiceProvider extends AbstractServiceProvider
         return new ArrayObject($container->get(MiddlewareStackResolver::class)->resolve('backend'));
     }
 
-    public static function configureBackendRouter(ContainerInterface $container, Routing\Router $router = null): Routing\Router
+    public static function configureBackendRouter(ContainerInterface $container, Router $router = null): Router
     {
-        $router = $router ?? self::new($container, Routing\Router::class);
+        $router = $router ?? self::new($container, Router::class);
         $cache = $container->get('cache.core');
 
         $cacheIdentifier = 'BackendRoutes_' . sha1((string)(new Typo3Version()) . Environment::getProjectPath() . 'BackendRoutes');
@@ -107,7 +112,7 @@ class ServiceProvider extends AbstractServiceProvider
         foreach ($routesFromPackages as $name => $options) {
             $path = $options['path'];
             unset($options['path']);
-            $route = new Routing\Route($path, $options);
+            $route = new Route($path, $options);
             $router->addRoute($name, $route);
         }
 
index c4ea31f..8fce986 100644 (file)
@@ -26,8 +26,10 @@ use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Information\Typo3Information;
 use TYPO3\CMS\Core\Localization\LanguageService;
+use TYPO3\CMS\Core\Messaging\FlashMessageService;
 use TYPO3\CMS\Core\Page\PageRenderer;
 use TYPO3\CMS\Core\Service\MarkerBasedTemplateService;
+use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\HttpUtility;
@@ -244,7 +246,7 @@ function jumpToUrl(URL) {
             // Make copy
             $ovr = $GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID];
             // merge styles.
-            \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TBE_STYLES'], $ovr);
+            ArrayUtility::mergeRecursiveWithOverrule($GLOBALS['TBE_STYLES'], $ovr);
             // Have to unset - otherwise the second instantiation will do it again!
             unset($GLOBALS['TBE_STYLES']['scriptIDindex'][$this->scriptID]);
         }
@@ -644,7 +646,6 @@ function jumpToUrl(URL) {
      * Tables, buttons, formatting dimmed/red strings
      *
      ******************************************/
-
     /**
      * Function to load a HTML template file with markers.
      * When calling from own extension, use  syntax getHtmlTemplate('EXT:extkey/template.html')
@@ -736,7 +737,7 @@ function jumpToUrl(URL) {
     public function getFlashMessages()
     {
         /** @var \TYPO3\CMS\Core\Messaging\FlashMessageService $flashMessageService */
-        $flashMessageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class);
+        $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
         /** @var \TYPO3\CMS\Core\Messaging\FlashMessageQueue $defaultFlashMessageQueue */
         $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
         return $defaultFlashMessageQueue->renderFlashMessages();
index 2e032a7..7459cb4 100644 (file)
@@ -24,6 +24,7 @@ use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Core\Messaging\AbstractMessage;
+use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Core\Messaging\FlashMessageService;
 use TYPO3\CMS\Core\Page\PageRenderer;
@@ -498,7 +499,6 @@ class ModuleTemplate
      * Do not use these methods within own extensions if possible or
      * be prepared to change this later again.
      *******************************************/
-
     /**
      * Returns a linked shortcut-icon which will call the shortcut frame and set a
      * shortcut there back to the calling page/module
@@ -709,7 +709,7 @@ class ModuleTemplate
         }
         /* @var \TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage */
         $flashMessage = GeneralUtility::makeInstance(
-            \TYPO3\CMS\Core\Messaging\FlashMessage::class,
+            FlashMessage::class,
             $messageBody,
             $messageTitle,
             $severity,
index 8131259..e83b77e 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Backend\Tree;
 
+use TYPO3\CMS\Backend\Tree\Renderer\AbstractTreeRenderer;
+
 /**
  * Abstract Tree
  */
@@ -37,7 +39,7 @@ abstract class AbstractTree
     /**
      * @param \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider $dataProvider
      */
-    public function setDataProvider(\TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider $dataProvider)
+    public function setDataProvider(AbstractTreeDataProvider $dataProvider)
     {
         $this->dataProvider = $dataProvider;
     }
@@ -53,7 +55,7 @@ abstract class AbstractTree
     /**
      * @param \TYPO3\CMS\Backend\Tree\Renderer\AbstractTreeRenderer $nodeRenderer
      */
-    public function setNodeRenderer(\TYPO3\CMS\Backend\Tree\Renderer\AbstractTreeRenderer $nodeRenderer)
+    public function setNodeRenderer(AbstractTreeRenderer $nodeRenderer)
     {
         $this->nodeRenderer = $nodeRenderer;
     }
index 0bd3042..9e17b51 100644 (file)
@@ -40,5 +40,5 @@ abstract class AbstractTreeDataProvider
      * @param \TYPO3\CMS\Backend\Tree\TreeNode $node
      * @return \TYPO3\CMS\Backend\Tree\TreeNodeCollection
      */
-    abstract public function getNodes(\TYPO3\CMS\Backend\Tree\TreeNode $node);
+    abstract public function getNodes(TreeNode $node);
 }
index 891f27e..dc03042 100644 (file)
 
 namespace TYPO3\CMS\Backend\Tree\Renderer;
 
+use TYPO3\CMS\Backend\Tree\AbstractTree;
+use TYPO3\CMS\Backend\Tree\TreeNodeCollection;
+use TYPO3\CMS\Backend\Tree\TreeRepresentationNode;
+
 /**
  * Abstract Renderer
  */
@@ -27,7 +31,7 @@ abstract class AbstractTreeRenderer
      * @param bool $recursive
      * @return mixed
      */
-    abstract public function renderNode(\TYPO3\CMS\Backend\Tree\TreeRepresentationNode $node, $recursive = true);
+    abstract public function renderNode(TreeRepresentationNode $node, $recursive = true);
 
     /**
      * Renders a node collection recursive or just a single instance
@@ -36,7 +40,7 @@ abstract class AbstractTreeRenderer
      * @param bool $recursive
      * @return mixed
      */
-    abstract public function renderNodeCollection(\TYPO3\CMS\Backend\Tree\TreeNodeCollection $collection, $recursive = true);
+    abstract public function renderNodeCollection(TreeNodeCollection $collection, $recursive = true);
 
     /**
      * Renders a tree recursively or just a single instance
@@ -45,5 +49,5 @@ abstract class AbstractTreeRenderer
      * @param bool $recursive
      * @return mixed
      */
-    abstract public function renderTree(\TYPO3\CMS\Backend\Tree\AbstractTree $tree, $recursive = true);
+    abstract public function renderTree(AbstractTree $tree, $recursive = true);
 }
index 658b898..611649b 100644 (file)
 
 namespace TYPO3\CMS\Backend\Tree\Renderer;
 
+use TYPO3\CMS\Backend\Tree\AbstractTree;
+use TYPO3\CMS\Backend\Tree\TreeNodeCollection;
+use TYPO3\CMS\Backend\Tree\TreeRepresentationNode;
+
 /**
  * Renderer for unordered lists
  */
-class UnorderedListTreeRenderer extends \TYPO3\CMS\Backend\Tree\Renderer\AbstractTreeRenderer
+class UnorderedListTreeRenderer extends AbstractTreeRenderer
 {
     /**
      * recursion level
@@ -34,7 +38,7 @@ class UnorderedListTreeRenderer extends \TYPO3\CMS\Backend\Tree\Renderer\Abstrac
      * @param bool $recursive
      * @return string
      */
-    public function renderNode(\TYPO3\CMS\Backend\Tree\TreeRepresentationNode $node, $recursive = true)
+    public function renderNode(TreeRepresentationNode $node, $recursive = true)
     {
         $code = '<li><span class="' . htmlspecialchars($node->getIcon()) . '">&nbsp;</span>' . htmlspecialchars($node->getLabel());
         if ($recursive && $node->getChildNodes() !== null) {
@@ -53,7 +57,7 @@ class UnorderedListTreeRenderer extends \TYPO3\CMS\Backend\Tree\Renderer\Abstrac
      * @param bool $recursive
      * @return string
      */
-    public function renderTree(\TYPO3\CMS\Backend\Tree\AbstractTree $tree, $recursive = true)
+    public function renderTree(AbstractTree $tree, $recursive = true)
     {
         $this->recursionLevel = 0;
         $code = '<ul class="level' . $this->recursionLevel . '" style="margin-left:10px">';
@@ -69,7 +73,7 @@ class UnorderedListTreeRenderer extends \TYPO3\CMS\Backend\Tree\Renderer\Abstrac
      * @param bool $recursive
      * @return string
      */
-    public function renderNodeCollection(\TYPO3\CMS\Backend\Tree\TreeNodeCollection $collection, $recursive = true)
+    public function renderNodeCollection(TreeNodeCollection $collection, $recursive = true)
     {
         $code = '<ul class="level' . $this->recursionLevel . '" style="margin-left:10px">';
         foreach ($collection as $node) {
index 9268c2c..a4b72d6 100644 (file)
@@ -21,7 +21,7 @@ namespace TYPO3\CMS\Backend\Tree;
  * Note: This collection works only with integers as offset keys and not
  * with much datasets. You have been warned!
  */
-class SortedTreeNodeCollection extends \TYPO3\CMS\Backend\Tree\TreeNodeCollection
+class SortedTreeNodeCollection extends TreeNodeCollection
 {
     /**
      * Checks if a specific node is inside the collection
@@ -29,7 +29,7 @@ class SortedTreeNodeCollection extends \TYPO3\CMS\Backend\Tree\TreeNodeCollectio
      * @param \TYPO3\CMS\Backend\Tree\TreeNode $node
      * @return bool
      */
-    public function contains(\TYPO3\CMS\Backend\Tree\TreeNode $node)
+    public function contains(TreeNode $node)
     {
         return $this->offsetOf($node) !== -1;
     }
@@ -40,7 +40,7 @@ class SortedTreeNodeCollection extends \TYPO3\CMS\Backend\Tree\TreeNodeCollectio
      * @param \TYPO3\CMS\Backend\Tree\TreeNode $node
      * @return int
      */
-    protected function offsetOf(\TYPO3\CMS\Backend\Tree\TreeNode $node)
+    protected function offsetOf(TreeNode $node)
     {
         return $this->binarySearch($node, 0, $this->count() - 1);
     }
@@ -53,7 +53,7 @@ class SortedTreeNodeCollection extends \TYPO3\CMS\Backend\Tree\TreeNodeCollectio
      * @param int $end
      * @return int
      */
-    protected function binarySearch(\TYPO3\CMS\Backend\Tree\TreeNode $node, $start, $end)
+    protected function binarySearch(TreeNode $node, $start, $end)
     {
         if (!$start && $end - $start >= 2 || $end - $start > 2) {
             $divider = ceil(($end - $start) / 2);
index 262d622..bd51154 100644 (file)
 
 namespace TYPO3\CMS\Backend\Tree;
 
+use TYPO3\CMS\Core\Exception;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Tree Node
  */
-class TreeNode implements \TYPO3\CMS\Backend\Tree\ComparableNodeInterface, \Serializable
+class TreeNode implements ComparableNodeInterface, \Serializable
 {
     /**
      * Node Identifier
@@ -63,7 +64,7 @@ class TreeNode implements \TYPO3\CMS\Backend\Tree\ComparableNodeInterface, \Seri
      *
      * @param \TYPO3\CMS\Backend\Tree\TreeNodeCollection $childNodes
      */
-    public function setChildNodes(\TYPO3\CMS\Backend\Tree\TreeNodeCollection $childNodes)
+    public function setChildNodes(TreeNodeCollection $childNodes)
     {
         $this->childNodes = $childNodes;
     }
@@ -233,7 +234,7 @@ class TreeNode implements \TYPO3\CMS\Backend\Tree\ComparableNodeInterface, \Seri
     {
         $arrayRepresentation = unserialize($serializedString);
         if ($arrayRepresentation['serializeClassName'] !== static::class) {
-            throw new \TYPO3\CMS\Core\Exception('Deserialized object type is not identical!', 1294586646);
+            throw new Exception('Deserialized object type is not identical!', 1294586646);
         }
         $this->dataFromArray($arrayRepresentation);
     }
index f91c488..368da2a 100644 (file)
@@ -15,6 +15,9 @@
 
 namespace TYPO3\CMS\Backend\Tree;
 
+use TYPO3\CMS\Core\Exception;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Tree Node Collection
  */
@@ -53,7 +56,7 @@ class TreeNodeCollection extends \ArrayObject
      * @param TreeNode $otherNode
      * @return int
      */
-    public function nodeCompare(\TYPO3\CMS\Backend\Tree\TreeNode $node, \TYPO3\CMS\Backend\Tree\TreeNode $otherNode)
+    public function nodeCompare(TreeNode $node, TreeNode $otherNode)
     {
         return $node->compareTo($otherNode);
     }
@@ -78,7 +81,7 @@ class TreeNodeCollection extends \ArrayObject
     {
         $arrayRepresentation = unserialize($serializedString);
         if ($arrayRepresentation['serializeClassName'] !== static::class) {
-            throw new \TYPO3\CMS\Core\Exception('Deserialized object type is not identical!', 1294586647);
+            throw new Exception('Deserialized object type is not identical!', 1294586647);
         }
         $this->dataFromArray($arrayRepresentation);
     }
@@ -110,7 +113,7 @@ class TreeNodeCollection extends \ArrayObject
     {
         unset($data['serializeClassName']);
         foreach ($data as $index => $nodeArray) {
-            $node = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($nodeArray['serializeClassName'], $nodeArray);
+            $node = GeneralUtility::makeInstance($nodeArray['serializeClassName'], $nodeArray);
             $this->offsetSet($index, $node);
         }
     }
index d0b615e..6fb4184 100644 (file)
@@ -20,7 +20,7 @@ use TYPO3\CMS\Core\Imaging\Icon;
 /**
  * Representation Tree Node
  */
-class TreeRepresentationNode extends \TYPO3\CMS\Backend\Tree\TreeNode
+class TreeRepresentationNode extends TreeNode
 {
     /**
      * Node Label
index 8a5e893..810bd26 100644 (file)
@@ -25,6 +25,7 @@ use TYPO3\CMS\Core\Resource\Folder;
 use TYPO3\CMS\Core\Resource\FolderInterface;
 use TYPO3\CMS\Core\Resource\InaccessibleFolder;
 use TYPO3\CMS\Core\Resource\ResourceStorage;
+use TYPO3\CMS\Core\Resource\Utility\ListUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -373,7 +374,7 @@ class FolderTreeView extends AbstractTreeView
             $subFolders = [];
         } else {
             $subFolders = $folderObject->getSubfolders();
-            $subFolders = \TYPO3\CMS\Core\Resource\Utility\ListUtility::resolveSpecialFolderNames($subFolders);
+            $subFolders = ListUtility::resolveSpecialFolderNames($subFolders);
             uksort($subFolders, 'strnatcasecmp');
         }
 
index ff981da..f0e406d 100644 (file)
@@ -18,6 +18,7 @@ namespace TYPO3\CMS\Backend\Utility;
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Log\LoggerInterface;
 use TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher;
+use TYPO3\CMS\Backend\Controller\File\ThumbnailController;
 use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Cache\CacheManager;
@@ -45,6 +46,7 @@ use TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection;
 use TYPO3\CMS\Core\Information\Typo3Information;
 use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Core\Log\LogManager;
+use TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException;
 use TYPO3\CMS\Core\Resource\ProcessedFile;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Routing\InvalidRouteArgumentsException;
@@ -1077,7 +1079,7 @@ class BackendUtility
                     $workspaceId === 0
                 );
                 $fileReferences[$fileReference->getUid()] = $fileReference;
-            } catch (\TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException $e) {
+            } catch (FileDoesNotExistException $e) {
                 /**
                  * We just catch the exception here
                  * Reasoning: There is nothing an editor or even admin could do
@@ -1205,7 +1207,7 @@ class BackendUtility
             'parameters' => $parameters,
             'hmac' => GeneralUtility::hmac(
                 $parameters,
-                \TYPO3\CMS\Backend\Controller\File\ThumbnailController::class
+                ThumbnailController::class
             ),
         ];
         return (string)GeneralUtility::makeInstance(UriBuilder::class)
@@ -2737,7 +2739,7 @@ class BackendUtility
         }
 
         if ($routePath = GeneralUtility::_GP('route')) {
-            $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
+            $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
             $scriptUrl = (string)$uriBuilder->buildUriFromRoutePath($routePath, $mainParams);
             $scriptUrl .= $addParams;
         } else {
index c74f053..7a838be 100644 (file)
@@ -95,7 +95,7 @@ class BackendLayout
      */
     public static function create($identifier, $title, $configuration)
     {
-        return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
+        return GeneralUtility::makeInstance(
             static::class,
             $identifier,
             $title,
index 7add973..4ee6687 100644 (file)
 
 namespace TYPO3\CMS\Backend\View\BackendLayout;
 
+use TYPO3\CMS\Core\SingletonInterface;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Collection of backend layout data providers.
  */
-class DataProviderCollection implements \TYPO3\CMS\Core\SingletonInterface
+class DataProviderCollection implements SingletonInterface
 {
     /**
      * @var array|DataProviderInterface[]
@@ -52,12 +55,12 @@ class DataProviderCollection implements \TYPO3\CMS\Core\SingletonInterface
             $dataProvider = $classNameOrObject;
         } else {
             $className = $classNameOrObject;
-            $dataProvider = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($classNameOrObject);
+            $dataProvider = GeneralUtility::makeInstance($classNameOrObject);
         }
 
         if (!$dataProvider instanceof DataProviderInterface) {
             throw new \LogicException(
-                $className . ' must implement interface ' . \TYPO3\CMS\Backend\View\BackendLayout\DataProviderInterface::class,
+                $className . ' must implement interface ' . DataProviderInterface::class,
                 1381269811
             );
         }
@@ -122,7 +125,7 @@ class DataProviderCollection implements \TYPO3\CMS\Core\SingletonInterface
      */
     protected function createBackendLayoutCollection($identifier)
     {
-        return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
+        return GeneralUtility::makeInstance(
             BackendLayoutCollection::class,
             $identifier
         );
index b0033ed..6eb2efb 100644 (file)
 
 namespace TYPO3\CMS\Backend\View\BackendLayout;
 
+use TYPO3\CMS\Core\SingletonInterface;
+
 /**
  * Context that is forwarded to backend layout data providers.
  */
-class DataProviderContext implements \TYPO3\CMS\Core\SingletonInterface
+class DataProviderContext implements SingletonInterface
 {
     /**
      * @var int
index b679d77..68d8a3a 100644 (file)
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Backend\View\BackendLayout;
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\View\BackendLayoutView;
 use TYPO3\CMS\Core\Context\Context;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder;
@@ -93,7 +94,7 @@ class DefaultDataProvider implements DataProviderInterface
         return BackendLayout::create(
             'default',
             'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:pages.backend_layout.default',
-            \TYPO3\CMS\Backend\View\BackendLayoutView::getDefaultColumnLayout()
+            BackendLayoutView::getDefaultColumnLayout()
         );
     }
 
index 7634886..9e83302 100644 (file)
@@ -86,6 +86,6 @@ class Grid extends AbstractGridObject
         foreach ($this->rows[0]->getColumns() ?? [] as $column) {
             $span += $column->getColSpan();
         }
-        return $span ? $span : 1;
+        return $span ?: 1;
     }
 }
index 8d83f2b..13d5b81 100644 (file)
@@ -23,6 +23,7 @@ use TYPO3\CMS\Backend\View\BackendLayout\DataProviderContext;
 use TYPO3\CMS\Backend\View\BackendLayout\DefaultDataProvider;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Localization\LanguageService;
+use TYPO3\CMS\Core\SingletonInterface;
 use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -31,7 +32,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  * Backend layout for CMS
  * @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
  */
-class BackendLayoutView implements \TYPO3\CMS\Core\SingletonInterface
+class BackendLayoutView implements SingletonInterface
 {
     /**
      * @var DataProviderCollection
index 40fc601..b97593a 100644 (file)
@@ -81,7 +81,7 @@ class BackendTemplateView implements ViewInterface
      *
      * @param \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext Controller context which is available inside the view
      */
-    public function setControllerContext(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
+    public function setControllerContext(ControllerContext $controllerContext)
     {
         $this->templateView->setControllerContext($controllerContext);
     }
index a56d68e..fee6bf0 100644 (file)
@@ -28,5 +28,5 @@ interface PageLayoutViewDrawFooterHookInterface
      * @param array $info Processed values
      * @param array $row Record row of tt_content
      */
-    public function preProcess(\TYPO3\CMS\Backend\View\PageLayoutView &$parentObject, &$info, array &$row);
+    public function preProcess(PageLayoutView &$parentObject, &$info, array &$row);
 }
index 4f9b99e..e2681c7 100644 (file)
@@ -30,5 +30,5 @@ interface PageLayoutViewDrawItemHookInterface
      * @param string $itemContent Item content
      * @param array $row Record row of tt_content
      */
-    public function preProcess(\TYPO3\CMS\Backend\View\PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row);
+    public function preProcess(PageLayoutView &$parentObject, &$drawItem, &$headerContent, &$itemContent, array &$row);
 }
index c7a6290..20f324f 100644 (file)
@@ -19,11 +19,12 @@ namespace TYPO3\CMS\Backend\Tests\Functional\Domain\Repository\Localization;
 
 use TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository;
 use TYPO3\CMS\Core\Core\Bootstrap;
+use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
 
 /**
  * Test case for TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository
  */
-class LocalizationRepositoryTest extends \TYPO3\TestingFramework\Core\Functional\FunctionalTestCase
+class LocalizationRepositoryTest extends FunctionalTestCase
 {
     /**
      * @var LocalizationRepository
index c3ea4db..5d0ba16 100644 (file)
@@ -22,6 +22,9 @@ use TYPO3\CMS\Core\Http\Response;
 use TYPO3\CMS\Core\Http\ServerRequest;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
+use TYPO3\CMS\Core\Resource\File;
+use TYPO3\CMS\Core\Resource\Folder;
+use TYPO3\CMS\Core\Utility\File\ExtendedFileUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
@@ -60,15 +63,15 @@ class FileControllerTest extends UnitTestCase
      */
     protected function setUp(): void
     {
-        $this->fileResourceMock = $this->getMockBuilder(\TYPO3\CMS\Core\Resource\File::class)
+        $this->fileResourceMock = $this->getMockBuilder(File::class)
             ->setMethods(['toArray', 'getModificationTime', 'getExtension'])
             ->disableOriginalConstructor()
             ->getMock();
-        $this->folderResourceMock = $this->getMockBuilder(\TYPO3\CMS\Core\Resource\Folder::class)
+        $this->folderResourceMock = $this->getMockBuilder(Folder::class)
             ->setMethods(['getIdentifier'])
             ->disableOriginalConstructor()
             ->getMock();
-        $this->mockFileProcessor = $this->getMockBuilder(\TYPO3\CMS\Core\Utility\File\ExtendedFileUtility::class)
+        $this->mockFileProcessor = $this->getMockBuilder(ExtendedFileUtility::class)
             ->setMethods(['getErrorMessages'])
             ->disableOriginalConstructor()
             ->getMock();
@@ -124,7 +127,7 @@ class FileControllerTest extends UnitTestCase
      */
     public function processAjaxRequestDeleteProcessActuallyDoesNotChangeFileData()
     {
-        $subject = $this->getAccessibleMock(\TYPO3\CMS\Backend\Controller\File\FileController::class, ['init', 'main']);
+        $subject = $this->getAccessibleMock(FileController::class, ['init', 'main']);
 
         $fileData = ['delete' => [true]];
         $subject->_set('fileProcessor', $this->mockFileProcessor);
@@ -141,7 +144,7 @@ class FileControllerTest extends UnitTestCase
      */
     public function processAjaxRequestEditFileProcessActuallyDoesNotChangeFileData()
     {
-        $subject = $this->getAccessibleMock(\TYPO3\CMS\Backend\Controller\File\FileController::class, ['init', 'main']);
+        $subject = $this->getAccessibleMock(FileController::class, ['init', 'main']);
 
         $fileData = ['editfile' => [true]];
         $subject->_set('fileProcessor', $this->mockFileProcessor);
@@ -158,7 +161,7 @@ class FileControllerTest extends UnitTestCase
      */
     public function processAjaxRequestReturnsStatus200IfNoErrorOccurs()
     {
-        $subject = $this->getAccessibleMock(\TYPO3\CMS\Backend\Controller\File\FileController::class, ['init', 'main']);
+        $subject = $this->getAccessibleMock(FileController::class, ['init', 'main']);
 
         $fileData = ['editfile' => [true]];
         $subject->_set('fileProcessor', $this->mockFileProcessor);
index 7ef368a..c9b6719 100644 (file)
@@ -18,6 +18,7 @@ namespace TYPO3\CMS\Backend\Tests\Unit\Controller\File;
 use PHPUnit\Framework\MockObject\MockObject;
 use TYPO3\CMS\Backend\Controller\File\ThumbnailController;
 use TYPO3\CMS\Core\Http\Response;
+use TYPO3\CMS\Core\Http\ServerRequest;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
@@ -68,7 +69,7 @@ class ThumbnailControllerTest extends UnitTestCase
             'hmac' => $hmac,
         ];
 
-        $request = (new \TYPO3\CMS\Core\Http\ServerRequest())
+        $request = (new ServerRequest())
             ->withQueryParams($queryParameters);
         $this->subject->render($request);
     }
@@ -105,7 +106,7 @@ class ThumbnailControllerTest extends UnitTestCase
             ),
         ];
 
-        $request = (new \TYPO3\CMS\Core\Http\ServerRequest())
+        $request = (new ServerRequest())
             ->withQueryParams($queryParameters);
         self::assertInstanceOf(
             Response::class,
index afa1873..37bd59e 100644 (file)
@@ -18,7 +18,9 @@ namespace TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
 use TYPO3\CMS\Backend\Form\FormDataGroup\FlexFormSegment;
+use TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowDefaultValues;
 use TYPO3\CMS\Backend\Form\FormDataProvider\TcaFlexProcess;
+use TYPO3\CMS\Backend\Form\FormDataProvider\TcaRadioItems;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -827,7 +829,7 @@ class TcaFlexProcessTest extends UnitTestCase
         ];
 
         $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['flexFormSegment'] = [
-            \TYPO3\CMS\Backend\Form\FormDataProvider\TcaRadioItems::class => [],
+            TcaRadioItems::class => [],
         ];
 
         /** @var LanguageService|ObjectProphecy $languageService */
@@ -915,7 +917,7 @@ class TcaFlexProcessTest extends UnitTestCase
         ];
 
         $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['flexFormSegment'] = [
-            \TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowDefaultValues::class => [],
+            DatabaseRowDefaultValues::class => [],
         ];
 
         /** @var LanguageService|ObjectProphecy $languageService */
@@ -1117,7 +1119,7 @@ class TcaFlexProcessTest extends UnitTestCase
         ];
 
         $GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['flexFormSegment'] = [
-            \TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowDefaultValues::class => [],
+            DatabaseRowDefaultValues::class => [],
         ];
 
         /** @var LanguageService|ObjectProphecy $languageService */
index 0c75c8c..2567cf4 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Backend\Tests\Unit\Tree;
 
+use TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection;
+use TYPO3\CMS\Backend\Tree\TreeNode;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -24,22 +26,22 @@ class SortedTreeNodeCollectionTest extends UnitTestCase
 {
     protected function createTestCollection()
     {
-        $nodeCollection = new \TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection();
-        $node = new \TYPO3\CMS\Backend\Tree\TreeNode(['id' => 5]);
+        $nodeCollection = new SortedTreeNodeCollection();
+        $node = new TreeNode(['id' => 5]);
         $nodeCollection->append($node);
-        $node = new \TYPO3\CMS\Backend\Tree\TreeNode(['id' => 15]);
+        $node = new TreeNode(['id' => 15]);
         $nodeCollection->append($node);
-        $node = new \TYPO3\CMS\Backend\Tree\TreeNode(['id' => 3]);
+        $node = new TreeNode(['id' => 3]);
         $nodeCollection->append($node);
         return $nodeCollection;
     }
 
     protected function createTestCollectionWithTwoNodes()
     {
-        $nodeCollection = new \TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection();
-        $node = new \TYPO3\CMS\Backend\Tree\TreeNode(['id' => 5]);
+        $nodeCollection = new SortedTreeNodeCollection();
+        $node = new TreeNode(['id' => 5]);
         $nodeCollection->append($node);
-        $node = new \TYPO3\CMS\Backend\Tree\TreeNode(['id' => 3]);
+        $node = new TreeNode(['id' => 3]);
         $nodeCollection->append($node);
         return $nodeCollection;
     }
@@ -64,7 +66,7 @@ class SortedTreeNodeCollectionTest extends UnitTestCase
     public function collectionContainsNode()
     {
         $nodeCollection = $this->createTestCollection();
-        $node = new \TYPO3\CMS\Backend\Tree\TreeNode(['id' => 5]);
+        $node = new TreeNode(['id' => 5]);
         self::assertTrue($nodeCollection->contains($node));
     }
 
@@ -74,14 +76,14 @@ class SortedTreeNodeCollectionTest extends UnitTestCase
     public function searchDataWithBinarySearch()
     {
         $nodeCollection = $this->createTestCollection();
-        $node = new \TYPO3\CMS\Backend\Tree\TreeNode(['id' => 15]);
+        $node = new TreeNode(['id' => 15]);
         self::assertTrue($nodeCollection->contains($node));
-        $node = new \TYPO3\CMS\Backend\Tree\TreeNode(['id' => 99]);
+        $node = new TreeNode(['id' => 99]);
         self::assertFalse($nodeCollection->contains($node));
         $nodeCollection = $this->createTestCollectionWithTwoNodes();
-        $node = new \TYPO3\CMS\Backend\Tree\TreeNode(['id' => 3]);
+        $node = new TreeNode(['id' => 3]);
         self::assertTrue($nodeCollection->contains($node));
-        $node = new \TYPO3\CMS\Backend\Tree\TreeNode(['id' => 99]);
+        $node = new TreeNode(['id' => 99]);
         self::assertFalse($nodeCollection->contains($node));
     }
 }
index 5e5cc01..bc5da1d 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Backend\Tests\Unit\Tree;
 
+use TYPO3\CMS\Backend\Tree\TreeNode;
+use TYPO3\CMS\Backend\Tree\TreeNodeCollection;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -27,13 +29,13 @@ class TreeNodeCollectionTest extends UnitTestCase
      */
     public function sortNodes()
     {
-        $nodeCollection = new \TYPO3\CMS\Backend\Tree\TreeNodeCollection([
-            ['serializeClassName' => \TYPO3\CMS\Backend\Tree\TreeNode::class, 'id' => 15],
-            ['serializeClassName' => \TYPO3\CMS\Backend\Tree\TreeNode::class, 'id' => 25],
-            ['serializeClassName' => \TYPO3\CMS\Backend\Tree\TreeNode::class, 'id' => 5],
-            ['serializeClassName' => \TYPO3\CMS\Backend\Tree\TreeNode::class, 'id' => 2],
-            ['serializeClassName' => \TYPO3\CMS\Backend\Tree\TreeNode::class, 'id' => 150],
-            ['serializeClassName' => \TYPO3\CMS\Backend\Tree\TreeNode::class, 'id' => 67]
+        $nodeCollection = new TreeNodeCollection([
+            ['serializeClassName' => TreeNode::class, 'id' => 15],
+            ['serializeClassName' => TreeNode::class, 'id' => 25],
+            ['serializeClassName' => TreeNode::class, 'id' => 5],
+            ['serializeClassName' => TreeNode::class, 'id' => 2],
+            ['serializeClassName' => TreeNode::class, 'id' => 150],
+            ['serializeClassName' => TreeNode::class, 'id' => 67]
         ]);
         $nodeCollection->asort();
         $expected = [2, 5, 15, 25, 67, 150];
index 24b6807..c777025 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Backend\Tests\Unit\Utility;
 
+use Doctrine\DBAL\Driver\Statement;
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
 use Psr\EventDispatcher\EventDispatcherInterface;
@@ -288,7 +289,7 @@ class BackendUtilityTest extends UnitTestCase
         $relationHandlerInstance->tableArray['sys_category'] = [1, 2];
 
         [$queryBuilderProphet, $connectionPoolProphet] = $this->mockDatabaseConnection('sys_category');
-        $statementProphet = $this->prophesize(\Doctrine\DBAL\Driver\Statement::class);
+        $statementProphet = $this->prophesize(Statement::class);
         $statementProphet->fetch()->shouldBeCalled()->willReturn(
             [
                 'uid' => 1,
@@ -466,7 +467,7 @@ class BackendUtilityTest extends UnitTestCase
                 ]
             ]
         ];
-        $languageServiceProphecy = $this->prophesize(\TYPO3\CMS\Core\Localization\LanguageService::class);
+        $languageServiceProphecy = $this->prophesize(LanguageService::class);
         $languageServiceProphecy->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:yes')->willReturn('Yes');
         $languageServiceProphecy->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:no')->willReturn('No');
         $GLOBALS['LANG'] = $languageServiceProphecy->reveal();
@@ -496,7 +497,7 @@ class BackendUtilityTest extends UnitTestCase
                 ]
             ]
         ];
-        $languageServiceProphecy = $this->prophesize(\TYPO3\CMS\Core\Localization\LanguageService::class);
+        $languageServiceProphecy = $this->prophesize(LanguageService::class);
         $languageServiceProphecy->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:yes')->willReturn('Yes');
         $languageServiceProphecy->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:no')->willReturn('No');
         $GLOBALS['LANG'] = $languageServiceProphecy->reveal();
index 921568f..1deb211 100644 (file)
 
 namespace TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures;
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Disable getRecordWSOL and getRecordTitle dependency by returning stable results
  */
-class LabelFromItemListMergedReturnsCorrectFieldsFixture extends \TYPO3\CMS\Backend\Utility\BackendUtility
+class LabelFromItemListMergedReturnsCorrectFieldsFixture extends BackendUtility
 {
     /**
      * @return array
index da2e55d..30bf47b 100644 (file)
 
 namespace TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures;
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Disable getRecordWSOL and getRecordTitle dependency by returning stable results
  */
-class ProcessedValueForGroupWithMultipleAllowedTablesFixture extends \TYPO3\CMS\Backend\Utility\BackendUtility
+class ProcessedValueForGroupWithMultipleAllowedTablesFixture extends BackendUtility
 {
     /**
      * Get record WSOL
index 5ac3116..7abeb32 100644 (file)
 
 namespace TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures;
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Disable getRecordWSOL and getRecordTitle dependency by returning stable results
  */
-class ProcessedValueForGroupWithOneAllowedTableFixture extends \TYPO3\CMS\Backend\Utility\BackendUtility
+class ProcessedValueForGroupWithOneAllowedTableFixture extends BackendUtility
 {
     /**
      * Get record WSOL
index ac914ef..e20d601 100644 (file)
 
 namespace TYPO3\CMS\Backend\Tests\Unit\Utility\Fixtures;
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
+
 /**
  * Disable getRecordWSOL and getRecordTitle dependency by returning stable results
  */
-class ProcessedValueForSelectWithMMRelationFixture extends \TYPO3\CMS\Backend\Utility\BackendUtility
+class ProcessedValueForSelectWithMMRelationFixture extends BackendUtility
 {
     /**
      * Get record title
index 738a745..f728741 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Backend\Tests\Unit\View\BackendLayout;
 
+use TYPO3\CMS\Backend\View\BackendLayout\BackendLayout;
+use TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection;
 use TYPO3\CMS\Core\Utility\StringUtility;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
@@ -31,7 +33,7 @@ class BackendLayoutCollectionTest extends UnitTestCase
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1381597631);
         $identifier = StringUtility::getUniqueId('identifier__');
-        new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
+        new BackendLayoutCollection($identifier);
     }
 
     /**
@@ -40,7 +42,7 @@ class BackendLayoutCollectionTest extends UnitTestCase
     public function objectIsCreated()
     {
         $identifier = StringUtility::getUniqueId('identifier');
-        $backendLayoutCollection = new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
+        $backendLayoutCollection = new BackendLayoutCollection($identifier);
 
         self::assertEquals($identifier, $backendLayoutCollection->getIdentifier());
     }
@@ -53,9 +55,9 @@ class BackendLayoutCollectionTest extends UnitTestCase
         $this->expectException(\UnexpectedValueException::class);
         $this->expectExceptionCode(1381597628);
         $identifier = StringUtility::getUniqueId('identifier');
-        $backendLayoutCollection = new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
+        $backendLayoutCollection = new BackendLayoutCollection($identifier);
         $backendLayoutIdentifier = StringUtility::getUniqueId('identifier__');
-        $backendLayoutMock = $this->getMockBuilder(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class)
+        $backendLayoutMock = $this->getMockBuilder(BackendLayout::class)
             ->setMethods(['getIdentifier'])
             ->disableOriginalConstructor()
             ->getMock();
@@ -72,14 +74,14 @@ class BackendLayoutCollectionTest extends UnitTestCase
         $this->expectException(\LogicException::class);
         $this->expectExceptionCode(1381559376);
         $identifier = StringUtility::getUniqueId('identifier');
-        $backendLayoutCollection = new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
+        $backendLayoutCollection = new BackendLayoutCollection($identifier);
         $backendLayoutIdentifier = StringUtility::getUniqueId('identifier');
-        $firstBackendLayoutMock = $this->getMockBuilder(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class)
+        $firstBackendLayoutMock = $this->getMockBuilder(BackendLayout::class)
             ->setMethods(['getIdentifier'])
             ->disableOriginalConstructor()
             ->getMock();
         $firstBackendLayoutMock->expects(self::once())->method('getIdentifier')->willReturn($backendLayoutIdentifier);
-        $secondBackendLayoutMock = $this->getMockBuilder(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class)
+        $secondBackendLayoutMock = $this->getMockBuilder(BackendLayout::class)
             ->setMethods(['getIdentifier'])
             ->disableOriginalConstructor()
             ->getMock();
@@ -95,9 +97,9 @@ class BackendLayoutCollectionTest extends UnitTestCase
     public function backendLayoutCanBeFetched()
     {
         $identifier = StringUtility::getUniqueId('identifier');
-        $backendLayoutCollection = new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayoutCollection($identifier);
+        $backendLayoutCollection = new BackendLayoutCollection($identifier);
         $backendLayoutIdentifier = StringUtility::getUniqueId('identifier');
-        $backendLayoutMock = $this->getMockBuilder(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class)
+        $backendLayoutMock = $this->getMockBuilder(BackendLayout::class)
             ->setMethods(['getIdentifier'])
             ->disableOriginalConstructor()
             ->getMock();
index e0b8a3f..4cb6bfe 100644 (file)
@@ -39,7 +39,7 @@ class BackendLayoutTest extends UnitTestCase
         $identifier = StringUtility::getUniqueId('identifier__');
         $title = StringUtility::getUniqueId('title');
         $configuration = StringUtility::getUniqueId('configuration');
-        new \TYPO3\CMS\Backend\View\BackendLayout\BackendLayout($identifier, $title, $configuration);
+        new BackendLayout($identifier, $title, $configuration);
     }
 
     /**
index 04832d8..a3e8f0a 100644 (file)
@@ -15,6 +15,9 @@
 
 namespace TYPO3\CMS\Backend\Tests\Unit\View\BackendLayout;
 
+use TYPO3\CMS\Backend\View\BackendLayout\BackendLayout;
+use TYPO3\CMS\Backend\View\BackendLayout\DataProviderCollection;
+use TYPO3\CMS\Backend\View\BackendLayout\DefaultDataProvider;
 use TYPO3\CMS\Core\Utility\StringUtility;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
@@ -34,7 +37,7 @@ class DataProviderCollectionTest extends UnitTestCase
     protected function setUp(): void
     {
         parent::setUp();
-        $this->dataProviderCollection = new \TYPO3\CMS\Backend\View\BackendLayout\DataProviderCollection();
+        $this->dataProviderCollection = new DataProviderCollection();
     }
 
     /**
@@ -70,11 +73,11 @@ class DataProviderCollectionTest extends UnitTestCase
     {
         $backendLayoutIdentifier = StringUtility::getUniqueId('identifier');
 
-        $dataProviderMock = $this->getMockBuilder(\TYPO3\CMS\Backend\View\BackendLayout\DefaultDataProvider::class)
+        $dataProviderMock = $this->getMockBuilder(DefaultDataProvider::class)
             ->setMethods(['getBackendLayout'])
             ->disableOriginalConstructor()
             ->getMock();
-        $backendLayoutMock = $this->getMockBuilder(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class)
+        $backendLayoutMock = $this->getMockBuilder(BackendLayout::class)
             ->setMethods(['getIdentifier'])
             ->disableOriginalConstructor()
             ->getMock();
@@ -96,11 +99,11 @@ class DataProviderCollectionTest extends UnitTestCase
         $dataProviderIdentifier = StringUtility::getUniqueId('custom');
         $backendLayoutIdentifier = StringUtility::getUniqueId('identifier');
 
-        $dataProviderMock = $this->getMockBuilder(\TYPO3\CMS\Backend\View\BackendLayout\DefaultDataProvider::class)
+        $dataProviderMock = $this->getMockBuilder(DefaultDataProvider::class)
             ->setMethods(['getBackendLayout'])
             ->disableOriginalConstructor()
             ->getMock();
-        $backendLayoutMock = $this->getMockBuilder(\TYPO3\CMS\Backend\View\BackendLayout\BackendLayout::class)
+        $backendLayoutMock = $this->getMockBuilder(BackendLayout::class)
             ->setMethods(['getIdentifier'])
             ->disableOriginalConstructor()
             ->getMock();
index f8ec0a1..c51d04f 100644 (file)
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Backend\Tests\Unit\View;
 
+use TYPO3\CMS\Backend\View\BackendLayoutView;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 
 /**
@@ -34,7 +35,7 @@ class BackendLayoutViewTest extends UnitTestCase
     {
         parent::setUp();
         $this->backendLayoutView = $this->getAccessibleMock(
-            \TYPO3\CMS\Backend\View\BackendLayoutView::class,
+            BackendLayoutView::class,
             ['getPage', 'getRootLine'],
             [],
             '',