[TASK] Remove unused local variables 64/49764/7
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 2 Sep 2016 14:21:03 +0000 (16:21 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 9 Oct 2016 11:27:25 +0000 (13:27 +0200)
Resolves: #77819
Releases: master
Change-Id: If39540863a1114ce5ce3e57289da54bdfdffc4f2
Reviewed-on: https://review.typo3.org/49764
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Łukasz Uznański <l.uznanski@macopedia.pl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
53 files changed:
typo3/sysext/backend/Classes/Form/Container/AbstractContainer.php
typo3/sysext/backend/Classes/Form/Container/FullRecordContainer.php
typo3/sysext/backend/Classes/Form/Container/SingleFieldContainer.php
typo3/sysext/backend/Classes/Form/Element/SelectMultipleSideBySideElement.php
typo3/sysext/backend/Classes/Form/Element/TextElement.php
typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php
typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/compatibility7/Classes/Controller/SearchFormController.php
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Database/RelationHandler.php
typo3/sysext/core/Classes/Database/SoftReferenceIndex.php
typo3/sysext/core/Tests/Unit/Cache/Frontend/AbstractFrontendTest.php
typo3/sysext/core/Tests/Unit/FileStreamWrapperTest.php
typo3/sysext/core/Tests/Unit/Http/MessageTest.php
typo3/sysext/core/Tests/Unit/Http/RequestTest.php
typo3/sysext/core/Tests/Unit/Http/ResponseTest.php
typo3/sysext/core/Tests/Unit/Http/StreamTest.php
typo3/sysext/core/Tests/Unit/Http/UriTest.php
typo3/sysext/core/Tests/Unit/Resource/Driver/LocalDriverTest.php
typo3/sysext/core/Tests/Unit/Resource/ResourceFactoryTest.php
typo3/sysext/extbase/Classes/Validation/ValidatorResolver.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Mapper/DataMapperTest.php
typo3/sysext/extbase/Tests/Unit/Security/Cryptography/HashServiceTest.php
typo3/sysext/extbase/Tests/Unit/Utility/ExtensionUtilityTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/AbstractCompositeValidatorTest.php
typo3/sysext/extbase/Tests/Unit/Validation/Validator/AbstractValidatorTest.php
typo3/sysext/fluid/Tests/Functional/EscapeChildrenRenderingTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php
typo3/sysext/form/Classes/PostProcess/MailPostProcessor.php
typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
typo3/sysext/indexed_search/Classes/Hook/CrawlerHook.php
typo3/sysext/indexed_search/Classes/Indexer.php
typo3/sysext/install/Classes/Controller/Action/Tool/CleanUp.php
typo3/sysext/install/Classes/Service/SqlSchemaMigrationService.php
typo3/sysext/install/Classes/Updates/ExtensionManagerTables.php
typo3/sysext/lowlevel/Classes/MissingFilesCommand.php
typo3/sysext/lowlevel/Classes/OrphanRecordsCommand.php
typo3/sysext/rsaauth/Tests/Functional/Storage/SplitStorageTest.php
typo3/sysext/rtehtmlarea/Classes/Controller/ParseHtmlController.php
typo3/sysext/rtehtmlarea/Classes/Controller/SpellCheckingController.php
typo3/sysext/rtehtmlarea/Classes/Extension/Language.php
typo3/sysext/saltedpasswords/Classes/Salt/BlowfishSalt.php
typo3/sysext/saltedpasswords/Classes/Salt/Md5Salt.php
typo3/sysext/saltedpasswords/Classes/Salt/PhpassSalt.php
typo3/sysext/saltedpasswords/Tests/Unit/Salt/BlowfishSaltTest.php
typo3/sysext/scheduler/Classes/Controller/SchedulerCliController.php
typo3/sysext/scheduler/Classes/CronCommand/CronCommand.php
typo3/sysext/version/Classes/Controller/VersionModuleController.php
typo3/sysext/version/Classes/Hook/DataHandlerHook.php
typo3/sysext/workspaces/Classes/Controller/PreviewController.php
typo3/sysext/workspaces/Classes/Service/StagesService.php

index 3254a87..04c2a83 100644 (file)
@@ -112,7 +112,6 @@ abstract class AbstractContainer extends AbstractNode
             // Making the array of file items:
             $itemArray = GeneralUtility::trimExplode(',', $value, true);
             // Showing thumbnails:
-            $thumbnail = '';
             $imgs = [];
             $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
             foreach ($itemArray as $imgRead) {
index 0fbf08e..413c126 100644 (file)
@@ -35,7 +35,6 @@ class FullRecordContainer extends AbstractContainer
     public function render()
     {
         $table = $this->data['tableName'];
-        $row = $this->data['databaseRow'];
         $recordTypeValue = $this->data['recordTypeValue'];
 
         // Load the description content for the table if requested
index 3ec30ee..76fbe2b 100644 (file)
@@ -480,7 +480,6 @@ class SingleFieldContainer extends AbstractContainer
     protected function inlineFieldShouldBeSkipped()
     {
         $table = $this->data['tableName'];
-        $row = $this->data['databaseRow'];
         $fieldName = $this->data['fieldName'];
         $fieldConfig = $this->data['processedTca']['columns'][$fieldName]['config'];
 
index e2f020b..654195c 100644 (file)
@@ -39,11 +39,6 @@ class SelectMultipleSideBySideElement extends AbstractFormElement
         // Field configuration from TCA:
         $config = $parameterArray['fieldConf']['config'];
 
-        // Creating the label for the "No Matching Value" entry.
-        $noMatchingLabel = isset($parameterArray['fieldTSConfig']['noMatchingValue_label'])
-            ? $this->getLanguageService()->sL(trim($parameterArray['fieldTSConfig']['noMatchingValue_label']))
-            : '[ ' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.noMatchingValue') . ' ]';
-
         $selItems = $config['items'];
         $html = '';
         $disabled = '';
index ce983c2..b1c805e 100644 (file)
@@ -40,8 +40,6 @@ class TextElement extends AbstractFormElement
      */
     public function render()
     {
-        $languageService = $this->getLanguageService();
-
         $table = $this->data['tableName'];
         $fieldName = $this->data['fieldName'];
         $row = $this->data['databaseRow'];
index 2cc31e4..f26787f 100644 (file)
@@ -709,7 +709,6 @@ abstract class AbstractItemProvider
                 }
                 // Get all sheets and title
                 foreach ($flexForms as $extIdent => $extConf) {
-                    $extTitle = $languageService->sL(trim($extConf['title']));
                     // Get all fields in sheet
                     foreach ($extConf['ds']['sheets'] as $sheetName => $sheet) {
                         if (empty($sheet['ROOT']['el']) || !is_array($sheet['ROOT']['el'])) {
index 63b9d11..aa40186 100644 (file)
@@ -609,8 +609,6 @@ class FolderTreeView extends AbstractTreeView
     {
         if (!$this->storageHashNumbers) {
             $this->storageHashNumbers = [];
-            // Mapping md5-hash to shorter number:
-            $hashMap = [];
             foreach ($this->storages as $storageUid => $storage) {
                 $fileMounts = $storage->getFileMounts();
                 if (!empty($fileMounts)) {
index 28d2648..2babb48 100644 (file)
@@ -2830,7 +2830,6 @@ class BackendUtility
         // Initialize some variables
         $helpText = '';
         $abbrClassAdd = '';
-        $wrappedText = $text;
         $hasHelpTextOverload = !empty($overloadHelpText);
         // Get the help text that should be shown on hover
         if (!$hasHelpTextOverload) {
index 7839c01..2bee528 100644 (file)
@@ -863,7 +863,6 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                 if ($lP) {
                     list($lpRecord) = BackendUtility::getRecordsByField('pages_language_overlay', 'pid', $id, 'AND sys_language_uid=' . $lP);
                     BackendUtility::workspaceOL('pages_language_overlay', $lpRecord);
-                    $params = '&edit[pages_language_overlay][' . $lpRecord['uid'] . ']=edit&overrideVals[pages_language_overlay][sys_language_uid]=' . $lP;
                     $recordIcon = BackendUtility::wrapClickMenuOnIcon(
                         $this->iconFactory->getIconForRecord('pages_language_overlay', $lpRecord, Icon::SIZE_SMALL)->render(),
                         'pages_language_overlay',
index c00c3a1..5ae865f 100644 (file)
@@ -2413,7 +2413,6 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
             $path = '';
             $pageCount = count($rl);
             if (is_array($rl) && !empty($rl)) {
-                $index = 0;
                 $breadcrumbWrap = isset($this->conf['breadcrumbWrap']) ? $this->conf['breadcrumbWrap'] : '/';
                 $breadcrumbWraps = $GLOBALS['TSFE']->tmpl->splitConfArray(['wrap' => $breadcrumbWrap], $pageCount);
                 foreach ($rl as $k => $v) {
index 538267d..cbfbf4b 100644 (file)
@@ -509,7 +509,7 @@ class BackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractU
             if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['getPagePermsClause'])) {
                 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['getPagePermsClause'] as $_funcRef) {
                     $_params = ['currentClause' => $constraint, 'perms' => $perms];
-                    $str = GeneralUtility::callUserFunction($_funcRef, $_params, $this);
+                    GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                 }
             }
             return $constraint;
index 5ce1f9b..d011311 100644 (file)
@@ -830,7 +830,6 @@ class RelationHandler
                 ->where($queryBuilder->expr()->eq($uidLocal_field, (int)$uid));
             // Boolean: does the field "tablename" need to be filled?
             $prep = $tableC > 1 || $prependTableName || $this->MM_isMultiTableRelationship;
-            $additionalWhere_tablenames = '';
             if ($this->MM_is_foreign && $prep) {
                 $queryBuilder->andWhere(
                     $queryBuilder->expr()->eq('tablenames', $queryBuilder->createNamedParameter($this->currentTable))
index f091d08..6dadd6d 100644 (file)
@@ -283,7 +283,6 @@ class SoftReferenceIndex
      */
     public function findRef_email($content, $spParams)
     {
-        $resultArray = [];
         // Email:
         $parts = preg_split('/([^[:alnum:]]+)([A-Za-z0-9\\._-]+[@][A-Za-z0-9\\._-]+[\\.].[A-Za-z0-9]+)/', ' ' . $content . ' ', 10000, PREG_SPLIT_DELIM_CAPTURE);
         foreach ($parts as $idx => $value) {
@@ -320,7 +319,6 @@ class SoftReferenceIndex
      */
     public function findRef_url($content, $spParams)
     {
-        $resultArray = [];
         // URLs
         $parts = preg_split('/([^[:alnum:]"\']+)((http|ftp):\\/\\/[^[:space:]"\'<>]*)([[:space:]])/', ' ' . $content . ' ', 10000, PREG_SPLIT_DELIM_CAPTURE);
         foreach ($parts as $idx => $value) {
@@ -360,12 +358,11 @@ class SoftReferenceIndex
      */
     public function findRef_extension_fileref($content, $spParams)
     {
-        $resultArray = [];
         // Files starting with EXT:
         $parts = preg_split('/([^[:alnum:]"\']+)(EXT:[[:alnum:]_]+\\/[^[:space:]"\',]*)/', ' ' . $content . ' ', 10000, PREG_SPLIT_DELIM_CAPTURE);
         foreach ($parts as $idx => $value) {
             if ($idx % 3 == 2) {
-                $tokenID = $this->makeTokenID($idx);
+                $this->makeTokenID($idx);
                 $elements[$idx] = [];
                 $elements[$idx]['matchString'] = $value;
             }
index 21e1113..227abfe 100644 (file)
@@ -31,7 +31,7 @@ class AbstractFrontendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
             ->disableOriginalConstructor()
             ->getMock();
         foreach (['x', 'someValue', '123fivesixseveneight', 'some&', 'ab_cd%', rawurlencode('resource://some/äöü$&% sadf'), str_repeat('x', 250)] as $identifier) {
-            $abstractCache = $this->getMockBuilder(\TYPO3\CMS\Core\Cache\Frontend\StringFrontend::class)
+            $this->getMockBuilder(\TYPO3\CMS\Core\Cache\Frontend\StringFrontend::class)
                 ->setMethods(['__construct', 'get', 'set', 'has', 'remove', 'getByTag', 'flush', 'flushByTag', 'collectGarbage'])
                 ->setConstructorArgs([$identifier, $mockBackend])
                 ->getMock();
@@ -49,7 +49,7 @@ class AbstractFrontendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
             ->getMock();
         foreach (['', 'abc def', 'foo!', 'bar:', 'some/', 'bla*', 'one+', 'äöü', str_repeat('x', 251), 'x$', '\\a', 'b#'] as $identifier) {
             try {
-                $abstractCache = $this->getMockBuilder(\TYPO3\CMS\Core\Cache\Frontend\StringFrontend::class)
+                $this->getMockBuilder(\TYPO3\CMS\Core\Cache\Frontend\StringFrontend::class)
                     ->setMethods(['__construct', 'get', 'set', 'has', 'remove', 'getByTag', 'flush', 'flushByTag', 'collectGarbage'])
                     ->setConstructorArgs([$identifier, $mockBackend])
                     ->getMock();
index 4998c24..b47b0cf 100644 (file)
@@ -60,7 +60,7 @@ class FileStreamWrapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function windowsPathsCanBeProcessed()
     {
         $cRoot = 'C:\\Windows\\Root\\Path\\';
-        $root = vfsStream::setup('root');
+        vfsStream::setup('root');
         FileStreamWrapper::init($cRoot);
         FileStreamWrapper::registerOverlayPath('fileadmin', 'vfs://root/fileadmin');
 
index d57bb44..da66c82 100644 (file)
@@ -205,7 +205,7 @@ class MessageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     {
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1436717266);
-        $message = $this->message->withHeader('X-Foo', [$value]);
+        $this->message->withHeader('X-Foo', [$value]);
     }
 
     /**
@@ -230,7 +230,7 @@ class MessageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     {
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1436717266);
-        $message = $this->message->withHeader('X-Foo', $value);
+        $this->message->withHeader('X-Foo', $value);
     }
 
     /**
@@ -240,7 +240,7 @@ class MessageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     {
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1436717267);
-        $message = $this->message->withAddedHeader('X-Foo', $value);
+        $this->message->withAddedHeader('X-Foo', $value);
     }
 
     /**
index c21fff5..a0d9acb 100644 (file)
@@ -335,8 +335,8 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function getRequestTargetIsResetWithNewUri()
     {
         $request = (new Request())->withUri(new Uri('https://example.com/foo/bar'));
-        $original = $request->getRequestTarget();
-        $newRequest = $request->withUri(new Uri('http://mwop.net/bar/baz'));
+        $request->getRequestTarget();
+        $request->withUri(new Uri('http://mwop.net/bar/baz'));
     }
 
     /**
@@ -523,6 +523,6 @@ class RequestTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function constructorRaisesExceptionForHeadersWithCRLFVectors($name, $value)
     {
         $this->expectException(\InvalidArgumentException::class);
-        $request = new Request(null, null, 'php://memory', [$name => $value]);
+        new Request(null, null, 'php://memory', [$name => $value]);
     }
 }
index 858d8e7..f60837b 100644 (file)
@@ -75,7 +75,7 @@ class ResponseTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function testCannotSetInvalidStatusCode($code)
     {
         $this->expectException(\InvalidArgumentException::class);
-        $response = $this->response->withStatus($code);
+        $this->response->withStatus($code);
     }
 
     /**
@@ -227,6 +227,6 @@ class ResponseTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function cnstructorRaisesExceptionForHeadersWithCRLFVectors($name, $value)
     {
         $this->expectException(\InvalidArgumentException::class);
-        $request = new Response('php://memory', 200, [$name => $value]);
+        new Response('php://memory', 200, [$name => $value]);
     }
 }
index a4bc774..e5a4923 100644 (file)
@@ -98,7 +98,7 @@ class StreamTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function constructorRaisesExceptionWhenPassingInvalidStreamResource()
     {
         $this->expectException(\InvalidArgumentException::class);
-        $stream = new Stream(['  THIS WILL NOT WORK  ']);
+        new Stream(['  THIS WILL NOT WORK  ']);
     }
 
     /**
index dfe8693..77f74b2 100644 (file)
@@ -186,7 +186,7 @@ class UriTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $uri = new Uri('https://user:pass@local.example.com:3001/foo?bar=baz#quz');
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1436717326);
-        $new = $uri->withPort($port);
+        $uri->withPort($port);
     }
 
     /**
@@ -224,7 +224,7 @@ class UriTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $uri = new Uri('https://user:pass@local.example.com:3001/foo?bar=baz#quz');
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1436717328);
-        $new = $uri->withPath($path);
+        $uri->withPath($path);
     }
 
     /**
@@ -235,7 +235,7 @@ class UriTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $uri = new Uri('https://user:pass@local.example.com:3001/foo?bar=baz#quz');
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1436717330);
-        $new = $uri->withPath('/bar/baz?bat=quz');
+        $uri->withPath('/bar/baz?bat=quz');
     }
 
     /**
@@ -246,7 +246,7 @@ class UriTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $uri = new Uri('https://user:pass@local.example.com:3001/foo?bar=baz#quz');
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1436717332);
-        $new = $uri->withPath('/bar/baz#bat');
+        $uri->withPath('/bar/baz#bat');
     }
 
     /**
@@ -284,7 +284,7 @@ class UriTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $uri = new Uri('https://user:pass@local.example.com:3001/foo?bar=baz#quz');
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1436717334);
-        $new = $uri->withQuery($query);
+        $uri->withQuery($query);
     }
 
     /**
@@ -295,7 +295,7 @@ class UriTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $uri = new Uri('https://user:pass@local.example.com:3001/foo?bar=baz#quz');
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1436717336);
-        $new = $uri->withQuery('baz=bat#quz');
+        $uri->withQuery('baz=bat#quz');
     }
 
     /**
@@ -446,7 +446,7 @@ class UriTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     {
         $this->expectException(\InvalidArgumentException::class);
         $this->expectExceptionCode(1436717338);
-        $uri = new Uri($scheme . '://example.com');
+        new Uri($scheme . '://example.com');
     }
 
     /**
index 8e3d974..e219ff6 100644 (file)
@@ -638,7 +638,7 @@ class LocalDriverTest extends \TYPO3\CMS\Core\Tests\Unit\Resource\BaseTestCase
         $subFolder = vfsStream::newDirectory('fileadmin');
         $root->addChild($subFolder);
         // Load fixture files and folders from disk
-        $directory = vfsStream::copyFromFileSystem(__DIR__ . '/Fixtures/', $subFolder, 1024*1024);
+        vfsStream::copyFromFileSystem(__DIR__ . '/Fixtures/', $subFolder, 1024*1024);
         FileStreamWrapper::init(PATH_site);
         FileStreamWrapper::registerOverlayPath('fileadmin/', 'vfs://root/fileadmin/', false);
 
index 3881a89..7281afc 100644 (file)
@@ -77,7 +77,6 @@ class ResourceFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $mockedDriver = $this->getMockForAbstractClass(\TYPO3\CMS\Core\Resource\Driver\AbstractDriver::class);
         $driverFixtureClass = get_class($mockedDriver);
         \TYPO3\CMS\Core\Utility\GeneralUtility::addInstance($driverFixtureClass, $mockedDriver);
-        $mockedMount = $this->createMock(\TYPO3\CMS\Core\Resource\ResourceStorage::class);
         $mockedRegistry = $this->createMock(\TYPO3\CMS\Core\Resource\Driver\DriverRegistry::class);
         $mockedRegistry->expects($this->once())->method('getDriverClass')->with($this->equalTo($driverFixtureClass))->will($this->returnValue($driverFixtureClass));
         \TYPO3\CMS\Core\Utility\GeneralUtility::setSingletonInstance(\TYPO3\CMS\Core\Resource\Driver\DriverRegistry::class, $mockedRegistry);
index c981c66..98afcd2 100644 (file)
@@ -348,14 +348,12 @@ class ValidatorResolver implements \TYPO3\CMS\Core\SingletonInterface
      */
     protected function addCustomValidators($targetClassName, ConjunctionValidator &$conjunctionValidator)
     {
-        $addedValidatorClassName = null;
         // @todo: get rid of ClassNamingUtility usage once we dropped underscored class name support
         $possibleValidatorClassName = ClassNamingUtility::translateModelNameToValidatorName($targetClassName);
 
         $customValidator = $this->createValidator($possibleValidatorClassName);
         if ($customValidator !== null) {
             $conjunctionValidator->addValidator($customValidator);
-            $addedValidatorClassName = get_class($customValidator);
         }
 
         // @todo: find polytype validator for class
index 7d50d58..982c978 100644 (file)
@@ -195,7 +195,6 @@ class DataMapperTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $className2WithNS = __NAMESPACE__ . '\\' . $className2;
         eval('namespace ' . __NAMESPACE__ . '; class ' . $className2 . ' extends \\' . \TYPO3\CMS\Extbase\DomainObject\AbstractEntity::class . ' { }');
         $child = new $className2WithNS();
-        $classSchema2 = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Reflection\ClassSchema::class, ['dummy'], [$className2WithNS]);
 
         /** @var \TYPO3\CMS\Extbase\Reflection\ClassSchema|AccessibleObjectInterface|\PHPUnit_Framework_MockObject_MockObject $classSchema1 */
         $classSchema1 = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Reflection\ClassSchema::class, ['dummy'], [$classNameWithNS]);
index 0cee1d1..181c88f 100644 (file)
@@ -67,7 +67,7 @@ class HashServiceTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     {
         $this->expectException(InvalidArgumentForHashGenerationException::class);
         $this->expectExceptionCode(1255069587);
-        $hash = $this->hashService->generateHmac(null);
+        $this->hashService->generateHmac(null);
     }
 
     /**
index 37d1f19..c26db36 100644 (file)
@@ -79,7 +79,6 @@ class ExtensionUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_setup.'] = [];
         \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin('MyExtension', 'Pi1', ['Blog' => 'index']);
         $staticTypoScript = $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_setup.']['defaultContentRendering'];
-        $defaultTypoScript = $GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_setup'];
         $this->assertContains('tt_content.list.20.myextension_pi1 = USER', $staticTypoScript);
     }
 
index f6aeea4..f071818 100644 (file)
@@ -67,7 +67,7 @@ class AbstractCompositeValidatorTest extends UnitTestCase
         $inputOptions = ['invalidoption' => 42];
         $this->expectException(\TYPO3\CMS\Extbase\Validation\Exception\InvalidValidationOptionsException::class);
         $this->expectExceptionCode(1339079804);
-        $validator = $this->getAccessibleMock(AbstractCompositeValidatorClass::class, ['dummy'], [$inputOptions]);
+        $this->getAccessibleMock(AbstractCompositeValidatorClass::class, ['dummy'], [$inputOptions]);
     }
 
     /**
@@ -78,6 +78,6 @@ class AbstractCompositeValidatorTest extends UnitTestCase
         $inputOptions = [];
         $this->expectException(\TYPO3\CMS\Extbase\Validation\Exception\InvalidValidationOptionsException::class);
         $this->expectExceptionCode(1339163922);
-        $validator = $this->getAccessibleMock(AbstractCompositeValidatorClass::class, ['dummy'], [$inputOptions]);
+        $this->getAccessibleMock(AbstractCompositeValidatorClass::class, ['dummy'], [$inputOptions]);
     }
 }
index 7b7b97e..69325b8 100644 (file)
@@ -67,7 +67,7 @@ class AbstractValidatorTest extends UnitTestCase
         $inputOptions = ['invalidoption' => 42];
         $this->expectException(\TYPO3\CMS\Extbase\Validation\Exception\InvalidValidationOptionsException::class);
         $this->expectExceptionCode(1379981890);
-        $validator = $this->getAccessibleMock(AbstractValidatorClass::class, ['dummy'], [$inputOptions]);
+        $this->getAccessibleMock(AbstractValidatorClass::class, ['dummy'], [$inputOptions]);
     }
 
     /**
@@ -78,6 +78,6 @@ class AbstractValidatorTest extends UnitTestCase
         $inputOptions = [];
         $this->expectException(\TYPO3\CMS\Extbase\Validation\Exception\InvalidValidationOptionsException::class);
         $this->expectExceptionCode(1379981891);
-        $validator = $this->getAccessibleMock(AbstractValidatorClass::class, ['dummy'], [$inputOptions]);
+        $this->getAccessibleMock(AbstractValidatorClass::class, ['dummy'], [$inputOptions]);
     }
 }
index 273c941..896aa28 100644 (file)
@@ -109,8 +109,6 @@ class EscapeChildrenRenderingTest extends FunctionalTestCase
     {
         $view = new TemplateView();
         $view->assign('settings', ['test' => '<strong>Bla</strong>']);
-        $templateString = '{namespace ft=TYPO3Fluid\\FluidTest\\ViewHelpers}';
-        $templateString .= $viewHelperTemplate;
         $view->getRenderingContext()->getViewHelperResolver()->addNamespace('ft', 'TYPO3Fluid\\FluidTest\\ViewHelpers');
         $view->getRenderingContext()->getTemplatePaths()->setTemplateSource($viewHelperTemplate);
 
index 97da6aa..3f0cef9 100644 (file)
@@ -13,7 +13,6 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Core\Rendering\RenderingContext;
 use TYPO3\CMS\Fluid\Core\ViewHelper\Exception;
 use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\DateViewHelper;
@@ -57,8 +56,6 @@ class DateViewHelperTest extends ViewHelperBaseTestcase
         $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] = 'Y-m-d';
         $this->viewHelper = new DateViewHelper();
         $this->injectDependenciesIntoViewHelper($this->viewHelper);
-        /** @var RenderingContext $renderingContext */
-        $renderingContext = $this->createMock(\TYPO3\CMS\Fluid\Tests\Unit\Core\Rendering\RenderingContextFixture::class);
     }
 
     protected function tearDown()
index de59248..1cf9517 100644 (file)
@@ -489,10 +489,6 @@ class MailPostProcessor extends AbstractPostProcessor implements PostProcessorIn
         /** @var \TYPO3\CMS\Fluid\View\StandaloneView $view */
         $view = $this->objectManager->get(\TYPO3\CMS\Fluid\View\StandaloneView::class);
 
-        $viewParts = [
-            'templateRootPaths' => $typoScript['view']['templateRootPaths'],
-            'partialRootPaths' => $typoScript['view']['partialRootPaths'],
-        ];
         /* Extend all template root paths to $templateRootPaths/PostProcessor/Mail/$themeName  */
         foreach ($typoScript['view']['templateRootPaths'] as &$path) {
             if (substr($path, -1) !== '/') {
index 1610c30..7c1cc8b 100644 (file)
@@ -1093,7 +1093,6 @@ class IndexSearchRepository
         } else {
             // Otherwise, if sorting are done with the pages table or other fields,
             // there is no need for joining with the rel/word tables:
-            $orderBy = '';
             switch ((string)$this->sortOrder) {
                 case 'title':
                     $queryBuilder->orderBy('IP.item_title', $this->getDescendingSortOrderFlag());
index 093d8df..490ebe8 100644 (file)
@@ -434,7 +434,7 @@ class CrawlerHook
         // Submit URLs:
         if (!empty($res)) {
             foreach ($res as $paramSetKey => $vv) {
-                $urlList = $pObj->urlListFromUrlArray($vv, $pageRow, $GLOBALS['EXEC_TIME'], 30, 1, 0, $duplicateTrack, $downloadUrls, ['tx_indexedsearch_reindex']);
+                $pObj->urlListFromUrlArray($vv, $pageRow, $GLOBALS['EXEC_TIME'], 30, 1, 0, $duplicateTrack, $downloadUrls, ['tx_indexedsearch_reindex']);
             }
         }
         // Add subpages to log now:
index 7f8bf69..9837193 100644 (file)
@@ -902,10 +902,6 @@ class Indexer
      */
     public function indexExternalUrl($externalUrl)
     {
-        // Parse External URL:
-        $qParts = parse_url($externalUrl);
-        $fI = pathinfo($qParts['path']);
-        $ext = strtolower($fI['extension']);
         // Get headers:
         $urlHeaders = $this->getUrlHeaders($externalUrl);
         if (stristr($urlHeaders['Content-Type'], 'text/html')) {
@@ -1342,7 +1338,6 @@ class Indexer
     public function indexAnalyze($content)
     {
         $indexArr = [];
-        $counter = 0;
         $this->analyzeHeaderinfo($indexArr, $content, 'title', 7);
         $this->analyzeHeaderinfo($indexArr, $content, 'keywords', 6);
         $this->analyzeHeaderinfo($indexArr, $content, 'description', 5);
index 1ab7ae3..2112cf8 100644 (file)
@@ -171,7 +171,7 @@ class CleanUp extends Action\AbstractAction
      */
     protected function resetBackendUserUc()
     {
-        $connection = GeneralUtility::makeInstance(ConnectionPool::class)
+        GeneralUtility::makeInstance(ConnectionPool::class)
             ->getQueryBuilderForTable('be_users')
             ->update('be_users')
             ->set('uc', '')
index 5b3ef65..6da1582 100644 (file)
@@ -639,7 +639,7 @@ class SqlSchemaMigrationService
             foreach ($arr as $key => $string) {
                 if (isset($keyArr[$key]) && $keyArr[$key]) {
                     try {
-                        $statement = $connection->query($string);
+                        $connection->query($string);
                     } catch (DBALException $e) {
                         $result[$key] = $e->getMessage();
                     }
index ee18d2d..ba85185 100644 (file)
@@ -130,9 +130,8 @@ class ExtensionManagerTables extends AbstractUpdate
     public function performUpdate(array &$dbQueries, &$customMessages)
     {
         $result = true;
-
-        $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
         $sqlReader = GeneralUtility::makeInstance(SqlReader::class);
+
         $createTableStatements = $this->getTableStatements();
 
         // First perform all create, add and change queries
index c803048..f37d299 100644 (file)
@@ -120,7 +120,6 @@ This will show you missing files in the TYPO3 system and only report back if err
     {
         foreach ($resultArray['managedFilesMissing'] as $key => $value) {
             echo 'Processing file: ' . $key . LF;
-            $c = 0;
             foreach ($value as $hash => $recReference) {
                 echo ' Removing reference in record "' . $recReference . '": ';
                 if ($bypass = $this->cli_noExecutionCheck($recReference)) {
index b7a7670..4459d18 100644 (file)
@@ -78,7 +78,6 @@ Will report orphan uids from TCA tables.';
         ];
         // zero = tree root, must use tree root if you wish to reverse selection to find orphans!
         $startingPoint = 0;
-        $pt = GeneralUtility::milliseconds();
         $this->genTree($startingPoint, 1000, (int)$this->cli_argValue('--echotree'));
         $resultArray['misplaced_at_rootlevel'] = $this->recStats['misplaced_at_rootlevel'];
         $resultArray['misplaced_inside_tree'] = $this->recStats['misplaced_inside_tree'];
index 4a34fd3..b760bd7 100644 (file)
@@ -111,7 +111,7 @@ class SplitStorageTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase
 
         $this->assertEquals($this->testKeyRightPart, $key);
 
-        $result = $this->subject->get();
+        $this->subject->get();
 
         $key = GeneralUtility::makeInstance(ConnectionPool::class)
             ->getConnectionForTable('tx_rsaauth_keys')
index 00414fd..7a7f9ab 100644 (file)
@@ -105,7 +105,6 @@ class ParseHtmlController
      */
     public function main_parse_html($openKeys)
     {
-        $editorNo = GeneralUtility::_GP('editorNo');
         $html = GeneralUtility::_GP('content');
         $RTEtsConfigParts = explode(':', GeneralUtility::_GP('RTEtsConfigParams'));
         $RTEsetup = $GLOBALS['BE_USER']->getTSConfig('RTE', \TYPO3\CMS\Backend\Utility\BackendUtility::getPagesTSconfig($RTEtsConfigParts[5]));
index 8625162..f3065ff 100644 (file)
@@ -589,7 +589,6 @@ var selectedDictionary = "' . $this->dictionary . '";
                             if (sizeof($this->misspelled) != 0) {
                                 $this->suggestedWords .= ',';
                             }
-                            $suggest = [];
                             $suggest = pspell_suggest($this->pspell_link, $word);
                             if (sizeof($suggest) != 0) {
                                 $this->suggestionCount++;
@@ -626,7 +625,6 @@ var selectedDictionary = "' . $this->dictionary . '";
                         . ' --encoding=' . escapeshellarg($this->aspellEncoding)
                         . ' 2>&1';
                     $AspellAnswer = shell_exec($AspellCommand);
-                    $AspellResultLines = [];
                     $AspellResultLines = GeneralUtility::trimExplode(LF, $AspellAnswer, true);
                     if (substr($AspellResultLines[0], 0, 6) == 'Error:') {
                         echo '{' . $AspellAnswer . '}';
index d226b75..9079044 100644 (file)
@@ -104,7 +104,6 @@ class Language extends RteHtmlAreaApi
     {
         $nameArray = [];
         if (ExtensionManagementUtility::isLoaded('static_info_tables')) {
-            $where = '1=1';
             $table = 'static_languages';
             $lang = LocalizationUtility::getCurrentLanguage();
             $titleFields = LocalizationUtility::getLabelFields($table, $lang);
index 55503dc..18cdbb2 100644 (file)
@@ -254,7 +254,6 @@ class BlowfishSalt extends Md5Salt
      */
     public function isValidSaltedPW($saltedPW)
     {
-        $isValid = false;
         $isValid = !strncmp($this->getSetting(), $saltedPW, strlen($this->getSetting()));
         if ($isValid) {
             $isValid = $this->isValidSalt($saltedPW);
index b02a536..fc7ba6a 100644 (file)
@@ -228,7 +228,6 @@ class Md5Salt extends AbstractSalt implements SaltInterface
      */
     public function isValidSaltedPW($saltedPW)
     {
-        $isValid = false;
         $isValid = !strncmp($this->getSetting(), $saltedPW, strlen($this->getSetting()));
         if ($isValid) {
             $isValid = $this->isValidSalt($saltedPW);
index 92a5e16..3b538bf 100644 (file)
@@ -353,7 +353,6 @@ class PhpassSalt extends AbstractSalt implements SaltInterface
      */
     public function isValidSaltedPW($saltedPW)
     {
-        $isValid = false;
         $isValid = !strncmp($this->getSetting(), $saltedPW, strlen($this->getSetting()));
         if ($isValid) {
             $isValid = $this->isValidSalt($saltedPW);
index a2bd7ad..84ce9f0 100644 (file)
@@ -245,7 +245,6 @@ class BlowfishSaltTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     {
         $this->skipTestIfBlowfishIsNotAvailable();
         $pad = 'a';
-        $password = '';
         $criticalPwLength = 0;
         // We're using a constant salt.
         $saltedHashPasswordCurrent = $salt = $this->objectInstance->getHashedPassword($pad);
index 1e0b6c6..dfd5ca5 100644 (file)
@@ -107,7 +107,7 @@ class SchedulerCliController
     protected function stopTask($task)
     {
         if ($this->scheduler->isValidTaskObject($task)) {
-            $result = $task->unmarkAllExecutions();
+            $task->unmarkAllExecutions();
         }
     }
 
index 20a5f04..f70f795 100644 (file)
@@ -187,7 +187,6 @@ class CronCommand
      */
     protected function isInCommandList($commandExpression, $numberToMatch)
     {
-        $inList = false;
         if ((string)$commandExpression === '*') {
             $inList = true;
         } else {
index 91093d5..ccea2d0 100644 (file)
@@ -550,9 +550,6 @@ class VersionModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
             // If another page module was specified, replace the default Page module with the new one
             $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
             $pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
-            // Perform some access checks:
-            $a_wl = $GLOBALS['BE_USER']->check('modules', 'web_list');
-            $a_wp = $GLOBALS['BE_USER']->check('modules', $pageModule);
             $adminLink .= '<div class="btn-group btn-group-sm">';
             $adminLink .= '<a class="btn btn-default" href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(' . GeneralUtility::quoteJSvalue($pageModule) . '); return false;">'
                 . $this->moduleTemplate->getIconFactory()->getIcon('actions-page-open', Icon::SIZE_SMALL)->render()
index 56e5b5d..3f6df08 100644 (file)
@@ -556,9 +556,7 @@ class DataHandlerHook
                 BackendUtility::fixVersioningPid($elementTable, $elementRecord);
                 $pageUid = ($elementUid = $elementRecord['pid']);
             }
-            // fetch the TSconfig settings for the email
-            // old way, options are TCEMAIN.notificationEmail_body/subject
-            $TCEmainTSConfig = $tcemainObj->getTCEMAIN_TSconfig($pageUid);
+
             // new way, options are
             // pageTSconfig: tx_version.workspaces.stageNotificationEmail.subject
             // userTSconfig: page.tx_version.workspaces.stageNotificationEmail.subject
index 6a48755..cb34339 100644 (file)
@@ -225,7 +225,6 @@ class PreviewController extends AbstractController
     protected function generateJavascript()
     {
         $backendUser = $this->getBackendUser();
-        $lang = $this->getLanguageService();
         // If another page module was specified, replace the default Page module with the new one
         $newPageModule = trim($backendUser->getTSConfigVal('options.overridePageModule'));
         $pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
index f5be569..5a07460 100644 (file)
@@ -266,7 +266,6 @@ class StagesService implements \TYPO3\CMS\Core\SingletonInterface
      */
     public function getStageTitle($ver_stage)
     {
-        $stageTitle = '';
         switch ($ver_stage) {
             case self::STAGE_PUBLISH_EXECUTE_ID:
                 $stageTitle = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xlf:stage_publish');