[TASK] Remove unused imports 04/62604/3
authorOliver Bartsch <bo@cedev.de>
Thu, 12 Dec 2019 09:55:01 +0000 (10:55 +0100)
committerBenni Mack <benni@typo3.org>
Fri, 13 Dec 2019 16:01:30 +0000 (17:01 +0100)
Cleanup code by removing unused imports in various classes.

Also changes the corresponding ExtensionScanner tests because they
are counting the line numbers which changed by removing the imports.

Resolves: #89926
Releases: master, 9.5
Change-Id: I588a3aa778a342c6c1154bb431cd325497fd4d18
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62604
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Alexander Schnitzler <review.typo3.org@alexanderschnitzler.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Alexander Schnitzler <review.typo3.org@alexanderschnitzler.de>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Benni Mack <benni@typo3.org>
14 files changed:
typo3/sysext/backend/Classes/Controller/File/ThumbnailController.php
typo3/sysext/backend/Classes/Security/EmailLoginNotification.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Repository/TtContentRepository.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbBackendTest.php
typo3/sysext/form/Classes/ViewHelpers/RenderAllFormValuesViewHelper.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/CodeStatisticsTest.php
typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Fixtures/CodeStatisticsFixture.php
typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/FunctionCallMatcherFixture.php
typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/MethodArgumentRequiredMatcherFixture.php
typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/MethodCallMatcherFixture.php
typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/FunctionCallMatcherTest.php
typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/MethodArgumentRequiredMatcherTest.php
typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/MethodCallMatcherTest.php

index 27294c0..7a9cbd2 100644 (file)
@@ -19,7 +19,6 @@ 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\File;
 use TYPO3\CMS\Core\Resource\ProcessedFile;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
index 8b8d528..56cbf2a 100644 (file)
@@ -16,7 +16,6 @@ namespace TYPO3\CMS\Backend\Security;
  * The TYPO3 project - inspiring people to share!
  */
 
-use Symfony\Component\Mime\Address;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Mail\MailMessage;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
index 5b16eab..9d8b685 100644 (file)
@@ -16,12 +16,10 @@ namespace TYPO3\CMS\Extbase\Tests\Unit\Persistence\Generic\Storage;
 
 use Doctrine\DBAL\Driver\Statement;
 use Prophecy\Argument;
-use TYPO3\CMS\Core\Context\Context;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder;
 use TYPO3\CMS\Core\Database\Query\QueryBuilder;
 use TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer;
-use TYPO3\CMS\Core\Domain\Repository\PageRepository;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Extbase\Service\EnvironmentService;
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
index 64eff7b..95233bc 100644 (file)
@@ -17,7 +17,6 @@ namespace TYPO3\CMS\Form\ViewHelpers;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Core\Resource\File;
 use TYPO3\CMS\Form\Domain\Model\Renderable\CompositeRenderableInterface;
 use TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
index eb30a73..8e04e0a 100644 (file)
@@ -50,7 +50,6 @@ use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Service\DependencyOrderingService;
 use TYPO3\CMS\Core\Service\FlexFormService;
 use TYPO3\CMS\Core\Service\MarkerBasedTemplateService;
-use TYPO3\CMS\Core\Site\Entity\Site;
 use TYPO3\CMS\Core\Site\SiteFinder;
 use TYPO3\CMS\Core\TimeTracker\TimeTracker;
 use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
index 8c9681b..e1848e9 100644 (file)
@@ -41,6 +41,6 @@ class CodeStatisticsTest extends UnitTestCase
 
         self::assertTrue($subject->isFileIgnored());
         self::assertEquals(2, $subject->getNumberOfIgnoredLines());
-        self::assertEquals(7, $subject->getNumberOfEffectiveCodeLines());
+        self::assertEquals(6, $subject->getNumberOfEffectiveCodeLines());
     }
 }
index b2d49a6..40dc11e 100644 (file)
@@ -2,8 +2,6 @@
 declare(strict_types = 1);
 namespace TYPO3\CMS\Install\Tests\Unit\ExtensionScanner\Php\Fixtures;
 
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
 /**
  * @extensionScannerIgnoreFile
  */
index 09a3410..f49fbb9 100644 (file)
@@ -15,8 +15,6 @@ namespace TYPO3\CMS\Install\Tests\Unit\ExtensionScanner\Php\Matcher\Fixtures;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-
 /**
  * Fixture file
  */
index c3d3656..f075c61 100644 (file)
@@ -15,8 +15,6 @@ namespace TYPO3\CMS\Install\Tests\Unit\ExtensionScanner\Php\Matcher\Fixtures;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Backend\Utility\BackendUtility;
-
 /**
  * Fixture file
  */
index 3494700..2932cbd 100644 (file)
@@ -51,7 +51,7 @@ class FunctionCallMatcherTest extends UnitTestCase
         $traverser->addVisitor($subject);
         $traverser->traverse($statements);
         $expectedHitLineNumbers = [
-            28,
+            26,
         ];
         $actualHitLineNumbers = [];
         foreach ($subject->getMatches() as $hit) {
index 8546919..2130356 100644 (file)
@@ -51,8 +51,8 @@ class MethodArgumentRequiredMatcherTest extends UnitTestCase
         $traverser->addVisitor($subject);
         $traverser->traverse($statements);
         $expectedHitLineNumbers = [
-            28,
-            29,
+            26,
+            27,
         ];
         $actualHitLineNumbers = [];
         foreach ($subject->getMatches() as $hit) {
index f05211c..bb5ef43 100644 (file)
@@ -51,10 +51,10 @@ class MethodCallMatcherTest extends UnitTestCase
         $traverser->addVisitor($subject);
         $traverser->traverse($statements);
         $expectedHitLineNumbers = [
+            26,
             28,
-            30,
+            31,
             33,
-            35,
         ];
         $actualHitLineNumbers = [];
         foreach ($subject->getMatches() as $hit) {