[TASK] Remove unused PHP variables 60/59360/6
authorOliver Hader <oliver@typo3.org>
Wed, 30 Jan 2019 16:14:43 +0000 (17:14 +0100)
committerBenni Mack <benni@typo3.org>
Thu, 31 Jan 2019 06:03:54 +0000 (07:03 +0100)
Resolves: #87590
Releases: master
Change-Id: I30af97f075d352792370b363b0b152ead99eacab
Reviewed-on: https://review.typo3.org/59360
Tested-by: TYPO3com <noreply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
13 files changed:
typo3/sysext/core/Classes/Composer/InstallerScripts.php
typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php
typo3/sysext/core/Classes/Database/SoftReferenceIndex.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Classes/Utility/MathUtility.php
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php
typo3/sysext/form/Classes/ViewHelpers/Form/DatePickerViewHelper.php
typo3/sysext/indexed_search/Classes/Lexer.php
typo3/sysext/install/Classes/Controller/EnvironmentController.php
typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php
typo3/sysext/reports/Classes/Report/Status/Status.php
typo3/sysext/workspaces/Classes/Service/GridDataService.php

index ee9ba65..f13852f 100644 (file)
@@ -16,7 +16,6 @@ namespace TYPO3\CMS\Core\Composer;
  */
 
 use Composer\Script\Event;
-use Composer\Util\Filesystem;
 use TYPO3\CMS\Composer\Plugin\Core\InstallerScripts\EntryPoint;
 use TYPO3\CMS\Composer\Plugin\Core\InstallerScriptsRegistration;
 use TYPO3\CMS\Composer\Plugin\Core\ScriptDispatcher;
@@ -52,7 +51,6 @@ class InstallerScripts implements InstallerScriptsRegistration
                 {
                     parent::run($event);
 
-                    $filesystem = new Filesystem();
                     $composer = $event->getComposer();
                     $pluginConfig = \TYPO3\CMS\Composer\Plugin\Config::load($composer);
 
index 2121c36..8b29aab 100644 (file)
@@ -828,7 +828,6 @@ class FlexFormTools
                 if (isset($value['type']) && $value['type'] === 'array') {
                     // Array (Section) traversal
                     if ($value['section']) {
-                        $cc = 0;
                         if (isset($editData[$key]['el']) && is_array($editData[$key]['el'])) {
                             if ($this->reNumberIndexesOfSectionData) {
                                 $temp = [];
index 85eaeaa..4f74ae9 100644 (file)
@@ -89,7 +89,6 @@ class SoftReferenceIndex
      */
     public function findRef($table, $field, $uid, $content, $spKey, $spParams, $structurePath = '')
     {
-        $retVal = false;
         $this->tokenID_basePrefix = $table . ':' . $uid . ':' . $field . ':' . $structurePath . ':' . $spKey;
         switch ($spKey) {
             case 'notify':
index 004ffc1..0336251 100644 (file)
@@ -391,7 +391,6 @@ class GeneralUtility
     public static function normalizeIPv6($address)
     {
         $normalizedAddress = '';
-        $stageOneAddress = '';
         // According to RFC lowercase-representation is recommended
         $address = strtolower($address);
         // Normalized representation has 39 characters (0000:0000:0000:0000:0000:0000:0000:0000)
index 32a73aa..883c72d 100644 (file)
@@ -156,7 +156,7 @@ class MathUtility
                 }
             }
         }
-        $number = $Msign === '-' ? ($number -= $buffer) : ($number += $buffer);
+        $number = $Msign === '-' ? ($number - $buffer) : ($number + $buffer);
         return $err ? 'ERROR: ' . $err : $number;
     }
 
index e0e36bb..5a8ae00 100644 (file)
@@ -1307,7 +1307,6 @@ class FileList
     {
         $cells = [];
         $fullIdentifier = $fileOrFolderObject->getCombinedIdentifier();
-        $md5 = GeneralUtility::shortMD5($fullIdentifier);
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
         $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
 
index a4a0a36..927d173 100644 (file)
@@ -229,7 +229,6 @@ class FormRuntime implements RootRenderableInterface, \ArrayAccess
     {
         if (!$this->formState->isFormSubmitted()) {
             $this->currentPage = $this->formDefinition->getPageByIndex(0);
-            $renderingOptions = $this->currentPage->getRenderingOptions();
 
             if (!$this->currentPage->isEnabled()) {
                 throw new FormException('Disabling the first page is not allowed', 1527186844);
@@ -267,7 +266,6 @@ class FormRuntime implements RootRenderableInterface, \ArrayAccess
             $this->currentPage = null;
         } else {
             $this->currentPage = $this->formDefinition->getPageByIndex($currentPageIndex);
-            $renderingOptions = $this->currentPage->getRenderingOptions();
 
             if (!$this->currentPage->isEnabled()) {
                 if ($currentPageIndex === 0) {
index db00837..6bf063f 100644 (file)
@@ -127,8 +127,6 @@ class DatePickerViewHelper extends AbstractFormFieldViewHelper
             ->getViewHelperVariableContainer()
             ->get(RenderRenderableViewHelper::class, 'formRuntime');
 
-        $formState = $formRuntime->getFormState();
-
         $date = $formRuntime[$this->arguments['property']];
         if ($date instanceof \DateTime) {
             return $date;
index 66edadb..67a1eb4 100644 (file)
@@ -68,8 +68,6 @@ class Lexer
             $wordString = mb_strtolower($wordString, 'utf-8');
         }
         // Now, splitting words:
-        $len = 0;
-        $start = 0;
         $pos = 0;
         $words = [];
         $this->debugString = '';
index 989ccf7..a27f380 100644 (file)
@@ -883,7 +883,6 @@ class EnvironmentController extends AbstractController
         $inputFile = $imageBasePath . 'TestInput/Test.' . $inputFormat;
         $imageProcessor->imageMagickConvert_forceFileNameBody = StringUtility::getUniqueId('read') . '-' . $inputFormat;
         $imResult = $imageProcessor->imageMagickConvert($inputFile, 'jpg', '300', '', '', '', [], true);
-        $result = [];
         if ($imResult !== null) {
             $result = [
                 'fileExists' => file_exists($imResult[3]),
index dc7f9ab..4c9ca09 100644 (file)
@@ -72,7 +72,7 @@ class InternalLinktype extends AbstractLinktype
         unset($this->errorParams);
         // Only check pages records. Content elements will also be checked
         // as we extract the anchor in the next step.
-        [$table, $uid] = explode(':', $softRefEntry['substr']['recordRef']);
+        [$table] = explode(':', $softRefEntry['substr']['recordRef']);
         if (!in_array($table, ['pages', 'tt_content'], true)) {
             return true;
         }
index 6c19bee..05b014a 100644 (file)
@@ -216,7 +216,6 @@ class Status implements RequestAwareReportInterface
         // @todo extract into getLabel() method
         $secondaryStatuses = [];
         foreach ($statusCollection as $statusProviderId => $collection) {
-            $label = '';
             if (strpos($statusProviderId, 'LLL:') === 0) {
                 // Label provided by extension
                 $label = $this->getLanguageService()->sL($statusProviderId);
index 667b1d9..f599279 100644 (file)
@@ -232,7 +232,7 @@ class GridDataService implements LoggerAwareInterface
         }
         // Suggested slot method:
         // methodName(\TYPO3\CMS\Workspaces\Service\GridDataService $gridData, array $dataArray, array $versions)
-        list($this->dataArray, $versions) = $this->emitSignal(self::SIGNAL_GenerateDataArray_PostProcesss, $this->dataArray, $versions);
+        list($this->dataArray) = $this->emitSignal(self::SIGNAL_GenerateDataArray_PostProcesss, $this->dataArray, $versions);
         $this->sortDataArray();
         $this->resolveDataArrayDependencies();
     }