[CLEANUP] Remove some unused variables and cleanup some code styles 75/53975/3
authorMarkus Hoelzle <typo3@markus-hoelzle.de>
Thu, 7 Sep 2017 20:33:36 +0000 (22:33 +0200)
committerJan Helke <typo3@helke.de>
Fri, 8 Sep 2017 16:05:47 +0000 (18:05 +0200)
Remove some unused variable and cleanup some PHP docs and some code styles

Resolves: #82364
Releases: master
Change-Id: I72f69a7c05514088bd318fed0e2c4ecc4710e183
Reviewed-on: https://review.typo3.org/53975
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Simon Praetorius <simon@praetorius.me>
Reviewed-by: Matthias Vogel <typo3@kanti.de>
Reviewed-by: Romain Canon <romain.hydrocanon@gmail.com>
Tested-by: Matthias Vogel <typo3@kanti.de>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
14 files changed:
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Database/ConnectionPool.php
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/core/Classes/Migrations/TcaMigration.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Tests/Functional/Resource/ResourceStorageTest.php
typo3/sysext/form/Classes/Domain/Factory/AbstractFormFactory.php
typo3/sysext/form/Classes/Domain/Renderer/FluidFormRenderer.php
typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php
typo3/sysext/form/Classes/Hooks/FormElementsOnSubmitHooks.php
typo3/sysext/form/Classes/Mvc/ProcessingRule.php
typo3/sysext/form/Classes/ViewHelpers/FormViewHelper.php
typo3/sysext/form/Classes/ViewHelpers/RenderAllFormValuesViewHelper.php

index a3277ff..4367d5a 100644 (file)
@@ -3062,7 +3062,6 @@ class DataHandler
                 }
 
                 if ($DSelements[$key]['section']) {
-                    $newIndexCounter = 0;
                     foreach ($dataValues[$key]['el'] as $ik => $el) {
                         if (!is_array($el)) {
                             continue;
index 50be13d..f32ba70 100644 (file)
@@ -15,7 +15,6 @@ namespace TYPO3\CMS\Core\Database;
  * The TYPO3 project - inspiring people to share!
  */
 
-use Doctrine\DBAL\Configuration;
 use Doctrine\DBAL\DriverManager;
 use Doctrine\DBAL\Events;
 use Doctrine\DBAL\Types\Type;
index 253646b..aff1a4e 100644 (file)
@@ -2710,8 +2710,7 @@ class GraphicalFunctions
                     if ($this->setup['quality']) {
                         $quality = MathUtility::forceIntegerInRange($this->setup['quality'], 10, 100);
                     }
-                    if ($this->ImageWrite($this->im, $file, $quality)) {
-                    }
+                    $this->ImageWrite($this->im, $file, $quality);
                     break;
             }
         }
index d3d4a8a..f9a11bc 100644 (file)
@@ -2368,12 +2368,6 @@ class IconRegistry implements SingletonInterface
                 'name' => 'plug'
             ]
         ],
-        'module-help' => [
-            'provider' => FontawesomeIconProvider::class,
-            'options' => [
-                'name' => 'question-circle'
-            ]
-        ],
         'module-about' => [
             'provider' => SvgIconProvider::class,
             'options' => [
@@ -2640,12 +2634,6 @@ class IconRegistry implements SingletonInterface
                 'source' => 'EXT:core/Resources/Public/Icons/T3Icons/overlay/overlay-hidden.svg'
             ]
         ],
-        'overlay-endtime' => [
-            'provider' => SvgIconProvider::class,
-            'options' => [
-                'source' => 'EXT:core/Resources/Public/Icons/T3Icons/overlay/overlay-endtime.svg'
-            ]
-        ],
         'overlay-includes-subpages' => [
             'provider' => SvgIconProvider::class,
             'options' => [
index e5def1f..ed5c6fd 100644 (file)
@@ -206,7 +206,6 @@ class TcaMigration
                         'paletteName' => isset($fieldArray[2]) ? $fieldArray[2] : null,
                         'fieldExtra' => isset($fieldArray[3]) ? $fieldArray[3] : null,
                     ];
-                    $fieldName = $fieldArray['fieldName'];
                     if (!empty($fieldArray['fieldExtra'])) {
                         // Move fieldExtra "specConf" to columnsOverrides "defaultExtras"
                         if (!isset($newTca[$table]['types'][$typeName]['columnsOverrides'])) {
index 7ad9352..6e36761 100644 (file)
@@ -706,7 +706,6 @@ class GeneralUtility
     {
         $hashAlgorithm = 'sha1';
         $hashBlocksize = 64;
-        $hmac = '';
         $secret = $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey'] . $additionalSecret;
         if (extension_loaded('hash') && function_exists('hash_hmac') && function_exists('hash_algos') && in_array($hashAlgorithm, hash_algos())) {
             $hmac = hash_hmac($hashAlgorithm, $input, $secret);
index 183df4f..cafef03 100644 (file)
@@ -14,7 +14,6 @@ namespace TYPO3\CMS\Core\Tests\Functional\Resource;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Core\Resource\File;
 use TYPO3\CMS\Core\Resource\Folder;
 use TYPO3\CMS\Core\Resource\FolderInterface;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
index 809d2bd..1a2169a 100644 (file)
@@ -18,7 +18,6 @@ namespace TYPO3\CMS\Form\Domain\Factory;
  */
 
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Form\Domain\Model\FormDefinition;
 
 /**
index 0f0bd0a..b543156 100644 (file)
@@ -21,7 +21,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Fluid\View\TemplateView;
 use TYPO3\CMS\Form\Domain\Exception\RenderingException;
-use TYPO3\CMS\Form\Domain\Runtime\FormRuntime;
 use TYPO3\CMS\Form\ViewHelpers\RenderRenderableViewHelper;
 
 /**
index 5aaa7e8..fddd525 100644 (file)
@@ -333,7 +333,7 @@ class FormRuntime implements RootRenderableInterface, \ArrayAccess
 
     /**
      * @param Page $page
-     * return null|string
+     * @return null|string
      */
     protected function getHoneypotNameFromSession(Page $page)
     {
index 4df3b1a..bacae18 100644 (file)
@@ -35,6 +35,7 @@ class FormElementsOnSubmitHooks
      * @param RenderableInterface $renderable
      * @param mixed $elementValue submitted value of the element *before post processing*
      * @param array $requestArguments submitted raw request values
+     * @return mixed
      * @see FormRuntime::mapAndValidate()
      * @internal
      */
index 69f7968..bd41f14 100644 (file)
@@ -19,7 +19,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Error\Result;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Extbase\Property\PropertyMappingConfiguration;
-use TYPO3\CMS\Extbase\Validation\Validator\ConjunctionValidator;
 use TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface;
 
 /**
index 1d7fb12..fbff0d2 100644 (file)
@@ -17,7 +17,6 @@ namespace TYPO3\CMS\Form\ViewHelpers;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Extbase\Mvc\Web\Request;
 use TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper as FluidFormViewHelper;
 use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 
index 518c341..61cfce7 100644 (file)
@@ -23,7 +23,6 @@ use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
 use TYPO3\CMS\Form\Domain\Model\FormElements\FormElementInterface;
 use TYPO3\CMS\Form\Domain\Model\Renderable\CompositeRenderableInterface;
 use TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface;
-use TYPO3\CMS\Form\Domain\Runtime\FormRuntime;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
 use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;