From f2373226812130d61ea2f523c47f6782dc03f4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20Bodenschatz?= <coding@46halbe.de> Date: Sat, 31 Jan 2015 16:02:27 +0100 Subject: [PATCH] [CLEANUP] Make use of possible imports and remove unused ones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: #64690 Releases: master Change-Id: Ia785278f0210416a0075e8e6eed712d97fd7272a Reviewed-on: http://review.typo3.org/36513 Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Stephan Großberndt <stephan@grossberndt.de> Tested-by: Stephan Großberndt <stephan@grossberndt.de> Reviewed-by: Steffen Müller <typo3@t3node.com> Tested-by: Steffen Müller <typo3@t3node.com> --- typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php | 4 ++-- typo3/sysext/backend/Classes/Controller/LoginController.php | 1 - typo3/sysext/backend/Classes/Form/Element/SelectElement.php | 1 - typo3/sysext/backend/Classes/Form/Element/TextElement.php | 1 - typo3/sysext/backend/Classes/Rte/AbstractRte.php | 2 -- typo3/sysext/core/Classes/DataHandling/DataHandler.php | 1 - typo3/sysext/core/Classes/TypoScript/ConfigurationForm.php | 1 - .../sysext/core/Classes/Utility/File/ExtendedFileUtility.php | 1 - .../ConditionMatching/AbstractConditionMatcherTest.php | 3 +-- typo3/sysext/core/Tests/Unit/Utility/ResourceUtilityTest.php | 2 +- .../extensionmanager/Classes/Utility/FileHandlingUtility.php | 1 - .../fluid/Classes/ViewHelpers/Uri/TypolinkViewHelper.php | 4 ++-- .../fluid/Classes/ViewHelpers/Widget/PaginateViewHelper.php | 1 - .../Tests/Unit/ViewHelpers/Uri/TypolinkViewHelperTest.php | 1 - .../ViewHelpers/Widget/Controller/PaginateControllerTest.php | 1 - .../ContentObject/Exception/ProductionExceptionHandler.php | 4 ++-- .../frontend/Tests/Functional/Page/PageRepositoryTest.php | 2 +- .../Classes/RecordList/AbstractDatabaseRecordList.php | 2 -- .../recycler/Classes/Controller/RecyclerAjaxController.php | 1 - typo3/sysext/reports/Classes/Report/Status/Status.php | 1 - 20 files changed, 9 insertions(+), 26 deletions(-) diff --git a/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php b/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php index 41331f65b861..996ffa8346bf 100644 --- a/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php +++ b/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php @@ -16,13 +16,13 @@ namespace TYPO3\CMS\Backend\ClickMenu; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\Utility\IconUtility; +use TYPO3\CMS\Core\Resource\Folder; use TYPO3\CMS\Core\Resource\ResourceFactory; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Backend\Clipboard\Clipboard; use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; use TYPO3\CMS\Lang\LanguageService; -use TYPO3\CMS\Core\Resource\Folder; /** * Class for generating the click menu @@ -830,7 +830,7 @@ class ClickMenu { $userMayViewStorage = FALSE; $userMayEditStorage = FALSE; $identifier = $fileObject->getCombinedIdentifier(); - if ($fileObject instanceof \TYPO3\CMS\Core\Resource\Folder) { + if ($fileObject instanceof Folder) { $icon = IconUtility::getSpriteIconForResource($fileObject, array( 'class' => 'absmiddle', 'title' => htmlspecialchars($fileObject->getName()) diff --git a/typo3/sysext/backend/Classes/Controller/LoginController.php b/typo3/sysext/backend/Classes/Controller/LoginController.php index b1f87195ec4a..a26b0f08acca 100644 --- a/typo3/sysext/backend/Classes/Controller/LoginController.php +++ b/typo3/sysext/backend/Classes/Controller/LoginController.php @@ -17,7 +17,6 @@ namespace TYPO3\CMS\Backend\Controller; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Backend\Utility\IconUtility; use TYPO3\CMS\Core\Html\HtmlParser; -use TYPO3\CMS\Core\Messaging\FlashMessage; use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\HttpUtility; diff --git a/typo3/sysext/backend/Classes/Form/Element/SelectElement.php b/typo3/sysext/backend/Classes/Form/Element/SelectElement.php index 37f58a7d001f..6a5273815964 100644 --- a/typo3/sysext/backend/Classes/Form/Element/SelectElement.php +++ b/typo3/sysext/backend/Classes/Form/Element/SelectElement.php @@ -19,7 +19,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; use TYPO3\CMS\Backend\Utility\IconUtility; use TYPO3\CMS\Backend\Utility\BackendUtility; -use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; /** * Generation of TCEform elements of the type "select" diff --git a/typo3/sysext/backend/Classes/Form/Element/TextElement.php b/typo3/sysext/backend/Classes/Form/Element/TextElement.php index e9c3ba412f94..5f930eea137c 100644 --- a/typo3/sysext/backend/Classes/Form/Element/TextElement.php +++ b/typo3/sysext/backend/Classes/Form/Element/TextElement.php @@ -15,7 +15,6 @@ namespace TYPO3\CMS\Backend\Form\Element; */ use TYPO3\CMS\Backend\Utility\BackendUtility; -use TYPO3\CMS\Core\Html\RteHtmlParser; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\MathUtility; diff --git a/typo3/sysext/backend/Classes/Rte/AbstractRte.php b/typo3/sysext/backend/Classes/Rte/AbstractRte.php index 5b099b612b99..3b6af4431127 100644 --- a/typo3/sysext/backend/Classes/Rte/AbstractRte.php +++ b/typo3/sysext/backend/Classes/Rte/AbstractRte.php @@ -14,8 +14,6 @@ namespace TYPO3\CMS\Backend\Rte; * The TYPO3 project - inspiring people to share! */ -use TYPO3\CMS\Backend\Form\Element\TextElement; -use TYPO3\CMS\Backend\Template\DocumentTemplate; use TYPO3\CMS\Core\Utility\GeneralUtility; /** diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php index 75da6b9e79e5..2aa57ff6a313 100644 --- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php +++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php @@ -22,7 +22,6 @@ use TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools; use TYPO3\CMS\Core\Database\DatabaseConnection; use TYPO3\CMS\Core\Database\ReferenceIndex; use TYPO3\CMS\Core\Database\RelationHandler; -use TYPO3\CMS\Core\Html\RteHtmlParser; use TYPO3\CMS\Core\Messaging\FlashMessage; use TYPO3\CMS\Core\Messaging\FlashMessageService; use TYPO3\CMS\Core\Resource\ResourceFactory; diff --git a/typo3/sysext/core/Classes/TypoScript/ConfigurationForm.php b/typo3/sysext/core/Classes/TypoScript/ConfigurationForm.php index 3d1b53bcbd01..072cd243ef42 100644 --- a/typo3/sysext/core/Classes/TypoScript/ConfigurationForm.php +++ b/typo3/sysext/core/Classes/TypoScript/ConfigurationForm.php @@ -14,7 +14,6 @@ namespace TYPO3\CMS\Core\TypoScript; * The TYPO3 project - inspiring people to share! */ -use TYPO3\CMS\Backend\Utility\IconUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\ArrayUtility; diff --git a/typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php b/typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php index 6de0d1786241..fae4a0ceb87b 100644 --- a/typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php +++ b/typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php @@ -25,7 +25,6 @@ use TYPO3\CMS\Core\Resource\ResourceFactory; use TYPO3\CMS\Core\Resource\ResourceStorage; use TYPO3\CMS\Core\Utility\CommandUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Core\Utility\PathUtility; /** * Contains functions for performing file operations like copying, pasting, uploading, moving, diff --git a/typo3/sysext/core/Tests/Unit/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcherTest.php b/typo3/sysext/core/Tests/Unit/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcherTest.php index 07057e2bba00..65f594d46236 100644 --- a/typo3/sysext/core/Tests/Unit/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcherTest.php +++ b/typo3/sysext/core/Tests/Unit/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcherTest.php @@ -16,7 +16,6 @@ namespace TYPO3\CMS\Core\Tests\Unit\Configuration\TypoScript\ConditionMatching; use TYPO3\CMS\Core\Core\ApplicationContext; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; use TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher; use TYPO3\CMS\Core\Tests\UnitTestCase; @@ -332,4 +331,4 @@ class AbstractConditionMatcherTest extends UnitTestCase { ) ); } -} \ No newline at end of file +} diff --git a/typo3/sysext/core/Tests/Unit/Utility/ResourceUtilityTest.php b/typo3/sysext/core/Tests/Unit/Utility/ResourceUtilityTest.php index 0ed5a2d4eef6..c5e9fa87cd18 100644 --- a/typo3/sysext/core/Tests/Unit/Utility/ResourceUtilityTest.php +++ b/typo3/sysext/core/Tests/Unit/Utility/ResourceUtilityTest.php @@ -62,7 +62,7 @@ class ResourceUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase { $result = $unsortedList; usort( $result, - array(\TYPO3\CMS\Core\Utility\ResourceUtility::class, 'recursiveFileListSortingHelper') + array(ResourceUtility::class, 'recursiveFileListSortingHelper') ); $this->assertEquals($expectedList, $result); diff --git a/typo3/sysext/extensionmanager/Classes/Utility/FileHandlingUtility.php b/typo3/sysext/extensionmanager/Classes/Utility/FileHandlingUtility.php index b30dcdc7772c..e61e2ecf921c 100644 --- a/typo3/sysext/extensionmanager/Classes/Utility/FileHandlingUtility.php +++ b/typo3/sysext/extensionmanager/Classes/Utility/FileHandlingUtility.php @@ -4,7 +4,6 @@ use TYPO3\CMS\Core\Utility\PathUtility; use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extensionmanager\Domain\Model\Extension; use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException; -use TYPO3\CMS\Lang\LanguageService; /* * This file is part of the TYPO3 CMS project. diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/TypolinkViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/TypolinkViewHelper.php index 8135142f8471..ea42b5846a9a 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/TypolinkViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/TypolinkViewHelper.php @@ -60,7 +60,7 @@ class TypolinkViewHelper extends AbstractViewHelper { $content = ''; if ($parameter) { - $contentObject = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class); + $contentObject = GeneralUtility::makeInstance(ContentObjectRenderer::class); $content = $contentObject->typoLink_URL( array( 'parameter' => implode(' ', $typolinkParameter), @@ -110,4 +110,4 @@ class TypolinkViewHelper extends AbstractViewHelper { } return $typolinkConfiguration; } -} \ No newline at end of file +} diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Widget/PaginateViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Widget/PaginateViewHelper.php index 569b96f4e7fc..f4efa7bb2f02 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Widget/PaginateViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Widget/PaginateViewHelper.php @@ -23,7 +23,6 @@ namespace TYPO3\CMS\Fluid\ViewHelpers\Widget; use TYPO3\CMS\Extbase\Persistence\ObjectStorage; use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; use TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper; -use TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\PaginateController; /** * This ViewHelper renders a Pagination of objects. diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/TypolinkViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/TypolinkViewHelperTest.php index a29867c960b4..df794bb4652c 100644 --- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/TypolinkViewHelperTest.php +++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/TypolinkViewHelperTest.php @@ -15,7 +15,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Uri; * */ use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase; -use TYPO3\CMS\Core\Utility\GeneralUtility; /** * Class TypolinkViewHelperTest diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Widget/Controller/PaginateControllerTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Widget/Controller/PaginateControllerTest.php index 4579ceb4ecb7..c5dab9d5fe78 100644 --- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Widget/Controller/PaginateControllerTest.php +++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Widget/Controller/PaginateControllerTest.php @@ -11,7 +11,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Widget\Controller; * The TYPO3 project - inspiring people to share! * * */ use TYPO3\CMS\Extbase\Persistence\ObjectStorage; -use TYPO3\CMS\Fluid\View\TemplateView; /** * Test case diff --git a/typo3/sysext/frontend/Classes/ContentObject/Exception/ProductionExceptionHandler.php b/typo3/sysext/frontend/Classes/ContentObject/Exception/ProductionExceptionHandler.php index 92d2141d2b7a..5306a67ad4ce 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/Exception/ProductionExceptionHandler.php +++ b/typo3/sysext/frontend/Classes/ContentObject/Exception/ProductionExceptionHandler.php @@ -74,7 +74,7 @@ class ProductionExceptionHandler implements ExceptionHandlerInterface { * @return LoggerInterface */ protected function getLogger() { - return GeneralUtility::makeInstance(\TYPO3\CMS\Core\Log\LogManager::class)->getLogger(__CLASS__); + return GeneralUtility::makeInstance(LogManager::class)->getLogger(__CLASS__); } -} \ No newline at end of file +} diff --git a/typo3/sysext/frontend/Tests/Functional/Page/PageRepositoryTest.php b/typo3/sysext/frontend/Tests/Functional/Page/PageRepositoryTest.php index fcb7e06260b8..1f79472dcf66 100644 --- a/typo3/sysext/frontend/Tests/Functional/Page/PageRepositoryTest.php +++ b/typo3/sysext/frontend/Tests/Functional/Page/PageRepositoryTest.php @@ -26,7 +26,7 @@ class PageRepositoryTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase { protected function setUp() { parent::setUp(); $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml'); - $this->pagerepo = new \TYPO3\CMS\Frontend\Page\PageRepository(); + $this->pagerepo = new PageRepository(); $this->pagerepo->init(false); } diff --git a/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php b/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php index cea256826d3a..0905216e2aa9 100644 --- a/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php +++ b/typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php @@ -14,9 +14,7 @@ namespace TYPO3\CMS\Recordlist\RecordList; * The TYPO3 project - inspiring people to share! */ -use TYPO3\CMS\Backend\Module\BaseScriptClass; use TYPO3\CMS\Backend\RecordList\AbstractRecordList; -use TYPO3\CMS\Backend\Template\DocumentTemplate; use TYPO3\CMS\Backend\Tree\View\PageTreeView; use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; diff --git a/typo3/sysext/recycler/Classes/Controller/RecyclerAjaxController.php b/typo3/sysext/recycler/Classes/Controller/RecyclerAjaxController.php index 7a27973dbc53..cc86785c09aa 100644 --- a/typo3/sysext/recycler/Classes/Controller/RecyclerAjaxController.php +++ b/typo3/sysext/recycler/Classes/Controller/RecyclerAjaxController.php @@ -21,7 +21,6 @@ use TYPO3\CMS\Extbase\Utility\LocalizationUtility; use TYPO3\CMS\Fluid\View\StandaloneView; use TYPO3\CMS\Recycler\Domain\Model\Tables; use TYPO3\CMS\Recycler\Domain\Model\DeletedRecords; -use TYPO3\CMS\Recycler\Controller\DeletedRecordsController; /** * Controller class for the 'recycler' extension. Handles the AJAX Requests diff --git a/typo3/sysext/reports/Classes/Report/Status/Status.php b/typo3/sysext/reports/Classes/Report/Status/Status.php index b728033ae15f..450416a014fd 100644 --- a/typo3/sysext/reports/Classes/Report/Status/Status.php +++ b/typo3/sysext/reports/Classes/Report/Status/Status.php @@ -14,7 +14,6 @@ namespace TYPO3\CMS\Reports\Report\Status; * The TYPO3 project - inspiring people to share! */ -use TYPO3\CMS\Backend\Utility\IconUtility; use TYPO3\CMS\Reports\ExtendedStatusProviderInterface; use TYPO3\CMS\Reports\ReportInterface; use TYPO3\CMS\Reports\StatusProviderInterface; -- GitLab