[TASK] Adjust Cs-Fixer 2.0 hits 33/51433/3
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Wed, 25 Jan 2017 21:23:39 +0000 (22:23 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 26 Jan 2017 00:14:32 +0000 (01:14 +0100)
With the update of cs-fixer to version 2.0, some checks
got minor changes in behaviour. The core follows now in
applying those suggested changes.

Change-Id: I1326b698da1a9615729733d8408b583d150de284
Resolves: #79469
Relates: #79361
Releases: master, 7.6
Reviewed-on: https://review.typo3.org/51433
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
158 files changed:
typo3/deprecated.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Controller/Wizard/ColorpickerController.php
typo3/sysext/backend/Classes/Controller/Wizard/RteController.php
typo3/sysext/backend/Classes/Form/Container/FlexFormContainerContainer.php
typo3/sysext/backend/Classes/Form/Container/FullRecordContainer.php
typo3/sysext/backend/Classes/Form/Container/SingleFieldContainer.php
typo3/sysext/backend/Classes/Form/Element/CheckboxElement.php
typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php
typo3/sysext/backend/Classes/Form/Wizard/SuggestWizard.php
typo3/sysext/backend/Classes/History/RecordHistory.php
typo3/sysext/backend/Classes/Http/RequestHandler.php
typo3/sysext/backend/Classes/RecordList/AbstractRecordList.php
typo3/sysext/backend/Classes/Template/Components/Buttons/Action/HelpButton.php
typo3/sysext/backend/Classes/Template/Components/Buttons/Action/ShortcutButton.php
typo3/sysext/backend/Classes/Template/Components/Buttons/FullyRenderedButton.php
typo3/sysext/backend/Classes/Template/Components/Buttons/InputButton.php
typo3/sysext/backend/Classes/Template/Components/Buttons/LinkButton.php
typo3/sysext/backend/Classes/Template/Components/Menu/Menu.php
typo3/sysext/backend/Classes/Tree/Pagetree/ExtdirectTreeCommands.php
typo3/sysext/backend/Classes/Tree/Pagetree/PagetreeNode.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/Utility/IconUtility.php
typo3/sysext/backend/Classes/View/BackendLayout/BackendLayout.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/backend/Classes/View/ThumbnailView.php
typo3/sysext/backend/Tests/Unit/Form/Element/InputTextElementTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabasePageLanguageOverlayRowsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/DatabaseSystemLanguageRowsTest.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaColumnsProcessRecordTitleTest.php
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Cache/Backend/RedisBackend.php
typo3/sysext/core/Classes/Cache/Frontend/VariableFrontend.php
typo3/sysext/core/Classes/Category/Collection/CategoryCollection.php
typo3/sysext/core/Classes/Charset/CharsetConverter.php
typo3/sysext/core/Classes/Collection/StaticRecordCollection.php
typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php
typo3/sysext/core/Classes/Core/ApplicationContext.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Database/QueryGenerator.php
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Classes/Html/HtmlParser.php
typo3/sysext/core/Classes/Http/Stream.php
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
typo3/sysext/core/Classes/Imaging/IconFactory.php
typo3/sysext/core/Classes/Localization/Locales.php
typo3/sysext/core/Classes/Locking/SemaphoreLockStrategy.php
typo3/sysext/core/Classes/Resource/FileRepository.php
typo3/sysext/core/Classes/Resource/OnlineMedia/Helpers/OnlineMediaHelperRegistry.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php
typo3/sysext/core/Classes/TypoScript/ConfigurationForm.php
typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
typo3/sysext/core/Classes/Utility/ClientUtility.php
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Classes/Utility/MathUtility.php
typo3/sysext/core/Classes/Utility/MonitorUtility.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Resources/PHP/RemoveXSS.php
typo3/sysext/core/Tests/Functional/Cache/Backend/Typo3DatabaseBackendTest.php
typo3/sysext/core/Tests/Functional/Framework/Frontend/Collector.php
typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php
typo3/sysext/core/Tests/Unit/Imaging/IconFactoryTest.php
typo3/sysext/core/Tests/Unit/Locking/FileLockStrategyTest.php
typo3/sysext/core/Tests/Unit/Locking/SimpleLockStrategyTest.php
typo3/sysext/core/Tests/Unit/Log/Writer/DatabaseWriterTest.php
typo3/sysext/core/Tests/Unit/Resource/ResourceCompressorTest.php
typo3/sysext/core/Tests/Unit/Tree/TableConfiguration/Fixtures/TreeDataProviderWithConfigurationFixture.php
typo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/VersionNumberUtilityTest.php
typo3/sysext/dbal/Classes/Database/DatabaseConnection.php
typo3/sysext/documentation/Classes/Slots/ExtensionManager.php
typo3/sysext/extbase/Classes/Core/Bootstrap.php
typo3/sysext/extbase/Classes/Error/Result.php
typo3/sysext/extbase/Classes/Mvc/Cli/Response.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php
typo3/sysext/extbase/Classes/Persistence/Generic/PersistenceManager.php
typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php
typo3/sysext/extbase/Classes/Property/PropertyMapper.php
typo3/sysext/extbase/Classes/Property/PropertyMappingConfiguration.php
typo3/sysext/extbase/Classes/Property/TypeConverter/DateTimeConverter.php
typo3/sysext/extbase/Classes/Reflection/ClassReflection.php
typo3/sysext/extbase/Classes/Utility/ArrayUtility.php
typo3/sysext/extbase/Tests/Functional/Persistence/OperatorTest.php
typo3/sysext/extbase/Tests/Unit/Configuration/AbstractConfigurationManagerTest.php
typo3/sysext/extbase/Tests/Unit/Persistence/Generic/Storage/Typo3DbBackendTest.php
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/Fixtures/DateTimeSubFixture.php
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/PersistentObjectConverterTest.php
typo3/sysext/extbase/Tests/Unit/SignalSlot/DispatcherTest.php
typo3/sysext/extensionmanager/Classes/Domain/Model/Extension.php
typo3/sysext/extensionmanager/Tests/Unit/Utility/FileHandlingUtilityTest.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/BooleanNode.php
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractConditionViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/AbstractBackendViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfAuthenticatedViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/BytesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/SwitchViewHelper.php
typo3/sysext/fluid/Resources/PHP/Traits/CompileWithContentArgumentAndRenderStatic.php
typo3/sysext/fluid/Resources/PHP/Traits/CompileWithRenderStatic.php
typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserPatternTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/Fixtures/ClassWithTwoGetters.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php
typo3/sysext/fluid_styled_content/Configuration/TCA/Overrides/tt_content.php
typo3/sysext/form/Classes/Domain/Builder/ElementBuilder.php
typo3/sysext/form/Classes/Domain/Builder/FormBuilder.php
typo3/sysext/form/Classes/Domain/Builder/ValidationBuilder.php
typo3/sysext/form/Classes/Domain/Model/Configuration.php
typo3/sysext/form/Classes/Domain/Model/ValidationElement.php
typo3/sysext/form/Classes/Domain/Validator/RequiredValidator.php
typo3/sysext/form/Classes/Mvc/Controller/ControllerContext.php
typo3/sysext/form/Classes/Utility/CompatibilityLayerUtility.php
typo3/sysext/form/Classes/Utility/FormUtility.php
typo3/sysext/form/Tests/Unit/Validator/BetweenValidatorTest.php
typo3/sysext/frontend/Classes/ContentObject/ContentContentObject.php
typo3/sysext/frontend/Classes/ContentObject/ContentDataProcessor.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/Menu/CategoryMenuUtility.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/DataProcessing/FilesProcessor.php
typo3/sysext/frontend/Classes/Imaging/GifBuilder.php
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/frontend/Classes/View/AdminPanelView.php
typo3/sysext/impexp/Classes/Controller/ImportExportController.php
typo3/sysext/indexed_search/Classes/Hook/CrawlerHook.php
typo3/sysext/install/Classes/Controller/Action/Step/DatabaseData.php
typo3/sysext/install/Classes/Controller/Action/Tool/TestSetup.php
typo3/sysext/install/Classes/FolderStructure/DirectoryNode.php
typo3/sysext/install/Classes/FolderStructure/FileNode.php
typo3/sysext/install/Classes/Service/ContextService.php
typo3/sysext/install/Classes/Service/CoreUpdateService.php
typo3/sysext/install/Classes/Service/EnableFileService.php
typo3/sysext/install/Classes/Service/SessionService.php
typo3/sysext/install/Classes/Service/SqlSchemaMigrationService.php
typo3/sysext/install/Classes/SystemEnvironment/Check.php
typo3/sysext/lang/Classes/Service/RegistryService.php
typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php
typo3/sysext/recordlist/Classes/RecordList.php
typo3/sysext/reports/Classes/Report/Status/SecurityStatus.php
typo3/sysext/rsaauth/Classes/RsaAuthService.php
typo3/sysext/rtehtmlarea/Classes/Controller/SpellCheckingController.php
typo3/sysext/rtehtmlarea/Classes/ImageHandler/AddImageHandler.php
typo3/sysext/saltedpasswords/Classes/Salt/BlowfishSalt.php
typo3/sysext/saltedpasswords/Classes/Salt/PhpassSalt.php
typo3/sysext/saltedpasswords/Classes/Utility/ExtensionManagerConfigurationUtility.php
typo3/sysext/scheduler/Classes/Task/AbstractTask.php
typo3/sysext/sv/Classes/AuthenticationService.php
typo3/sysext/sys_note/Classes/Core/Bootstrap.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateObjectBrowserModuleFunctionController.php
typo3/sysext/version/Classes/Hook/PreviewHook.php
typo3/sysext/workspaces/Classes/Domain/Record/StageRecord.php
typo3/sysext/workspaces/Classes/Service/GridDataService.php
typo3/sysext/workspaces/Classes/Service/StagesService.php
typo3/sysext/workspaces/Tests/Functional/Service/WorkspaceServiceTest.php

index 5809669..7f83fa0 100644 (file)
@@ -23,7 +23,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 call_user_func(function () {
     $classLoader = require __DIR__ . '/../vendor/autoload.php';
     (new \TYPO3\CMS\Backend\Http\Application($classLoader))->run(function () {
-
         $originalRequestedFilenameParts = parse_url(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'));
         $originalRequestedFilename = basename($originalRequestedFilenameParts['path']);
 
@@ -220,6 +219,5 @@ call_user_func(function () {
             default:
                 throw new \RuntimeException('You cannot call this script directly.');
         }
-
     });
 });
index af85ff9..06934bd 100644 (file)
@@ -773,7 +773,7 @@ class ElementInformationController
                                <div class="table-fit">
                                        <table class="table table-striped table-hover">
                                                <thead>' . $infoDataHeader . '</thead>
-                                               <tbody>' . implode('', $infoData) .    '</tbody>
+                                               <tbody>' . implode('', $infoData) . '</tbody>
                                        </table>
                                </div>';
         }
index fb4da47..5183203 100644 (file)
@@ -980,7 +980,7 @@ class PageLayoutController
             // Generate the list of elements here:
             $dbList->generateList();
             // Adding the list content to the tableOutput variable:
-            $tableOutput[$table] = $h_func .  $dbList->HTMLcode . $h_func_b;
+            $tableOutput[$table] = $h_func . $dbList->HTMLcode . $h_func_b;
             // ... and any accumulated JavaScript goes the same way!
             $tableJSOutput[$table] = $dbList->JScode;
             // Increase global counter:
index a27272f..251db78 100644 (file)
@@ -399,7 +399,7 @@ class ColorpickerController extends AbstractWizardController
      */
     public function getIndex($im, $x, $y)
     {
-        $rgb = ImageColorAt($im, $x, $y);
+        $rgb = imagecolorat($im, $x, $y);
         $colorRgb = imagecolorsforindex($im, $rgb);
         $index['r'] = dechex($colorRgb['red']);
         $index['g'] = dechex($colorRgb['green']);
index c6f39da..5fb2825 100644 (file)
@@ -292,7 +292,7 @@ class RteController extends AbstractWizardController
                 ->setName('_savedokview_x')
                 ->setValue('1')
                 ->setForm('RteController')
-                ->setOnClick('document.editform.redirect.value+= '  . GeneralUtility::quoteJSvalue('&popView=1') . '; '
+                ->setOnClick('document.editform.redirect.value+= ' . GeneralUtility::quoteJSvalue('&popView=1') . '; '
                     . ' TBE_EDITOR.checkAndDoSubmit(1); return false;')
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDocShow'))
                 ->setIcon(
index 695fa02..d1cd096 100644 (file)
@@ -75,7 +75,7 @@ class FlexFormContainerContainer extends AbstractContainer
         $options = $this->data;
         $options['flexFormFieldIdentifierPrefix'] = $flexFormFieldIdentifierPrefix;
         // Append container specific stuff to field prefix
-        $options['flexFormFormPrefix'] =  $flexFormFormPrefix . '[' . $flexFormContainerCounter . '][' .  $this->data['flexFormContainerName'] . '][el]';
+        $options['flexFormFormPrefix'] =  $flexFormFormPrefix . '[' . $flexFormContainerCounter . '][' . $this->data['flexFormContainerName'] . '][el]';
         $options['renderType'] = 'flexFormElementContainer';
         $containerContentResult = $this->nodeFactory->create($options)->render();
 
index 0fbf08e..897d3b8 100644 (file)
@@ -55,7 +55,7 @@ class FullRecordContainer extends AbstractContainer
             array_unshift($fieldsArray, '--div--;LLL:EXT:lang/locallang_core.xlf:labels.generalTab');
         }
         // If first tab has no label definition, add "general" label
-        $firstTabHasLabel = count(GeneralUtility::trimExplode(';',  $fieldsArray[0])) > 1;
+        $firstTabHasLabel = count(GeneralUtility::trimExplode(';', $fieldsArray[0])) > 1;
         if (!$firstTabHasLabel) {
             $fieldsArray[0] = '--div--;LLL:EXT:lang/locallang_core.xlf:labels.generalTab';
         }
index 85fddaf..3c51abb 100644 (file)
@@ -615,7 +615,7 @@ class SingleFieldContainer extends AbstractContainer
      */
     protected function isAssociativeArray($object)
     {
-        return is_array($object) && !empty($object) && array_keys($object) !== range(0, sizeof($object) - 1);
+        return is_array($object) && !empty($object) && array_keys($object) !== range(0, count($object) - 1);
     }
 
     /**
index c8d892e..55ec65f 100644 (file)
@@ -78,7 +78,7 @@ class CheckboxElement extends AbstractFormElement
                 $label = $itemDefinition[0];
                 $html .=
                     '<div class="checkbox-column ' . $colClass . '">'
-                        . $this->renderSingleCheckboxElement($label, $itemKey,  $formElementValue, $numberOfItems, $this->data['parameterArray'], $disabled) .
+                        . $this->renderSingleCheckboxElement($label, $itemKey, $formElementValue, $numberOfItems, $this->data['parameterArray'], $disabled) .
                     '</div>';
                 $counter = $counter + 1;
                 if ($counter < $numberOfItems && !empty($colClear)) {
index a6ee9a4..f5a0239 100644 (file)
@@ -162,7 +162,7 @@ abstract class AbstractItemProvider
 
         $special = $result['processedTca']['columns'][$fieldName]['config']['special'];
         switch (true) {
-            case ($special === 'tables'):
+            case $special === 'tables':
                 foreach ($GLOBALS['TCA'] as $currentTable => $_) {
                     if (!empty($GLOBALS['TCA'][$currentTable]['ctrl']['adminOnly'])) {
                         // Hide "admin only" tables
@@ -180,7 +180,7 @@ abstract class AbstractItemProvider
                     $items[] = [$label, $currentTable, $icon, $helpText];
                 }
                 break;
-            case ($special === 'pagetypes'):
+            case $special === 'pagetypes':
                 if (isset($GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'])
                     && is_array($GLOBALS['TCA']['pages']['columns']['doktype']['config']['items'])
                 ) {
@@ -197,7 +197,7 @@ abstract class AbstractItemProvider
                     }
                 }
                 break;
-            case ($special === 'exclude'):
+            case $special === 'exclude':
                 $excludeArrays = $this->getExcludeFields();
                 foreach ($excludeArrays as $excludeArray) {
                     // If the field comes from a FlexForm, the syntax is more complex
@@ -240,7 +240,7 @@ abstract class AbstractItemProvider
                     ];
                 }
                 break;
-            case ($special === 'explicitValues'):
+            case $special === 'explicitValues':
                 $theTypes = $this->getExplicitAuthFieldValues();
                 $icons = [
                     'ALLOW' => 'status-status-permission-granted',
@@ -266,7 +266,7 @@ abstract class AbstractItemProvider
                     }
                 }
                 break;
-            case ($special === 'languages'):
+            case $special === 'languages':
                 foreach ($result['systemLanguageRows'] as $language) {
                     if ($language['uid'] !== -1) {
                         $items[] = [
@@ -277,7 +277,7 @@ abstract class AbstractItemProvider
                     }
                 }
                 break;
-            case ($special === 'custom'):
+            case $special === 'custom':
                 $customOptions = $GLOBALS['TYPO3_CONF_VARS']['BE']['customPermOptions'];
                 if (is_array($customOptions)) {
                     foreach ($customOptions as $coKey => $coValue) {
@@ -327,7 +327,7 @@ abstract class AbstractItemProvider
                     }
                 }
                 break;
-            case ($special === 'modListGroup' || $special === 'modListUser'):
+            case $special === 'modListGroup' || $special === 'modListUser':
                 $loadModules = GeneralUtility::makeInstance(ModuleLoader::class);
                 $loadModules->load($GLOBALS['TBE_MODULES']);
                 $modList = $special === 'modListUser' ? $loadModules->modListUser : $loadModules->modListGroup;
index 6f728a0..3d75433 100644 (file)
@@ -300,7 +300,7 @@ class SuggestWizard
                 foreach ($sheet as $_ => $dataStructure) {
                     $fieldConfig = $this->getNestedDsFieldConfig($dataStructure, $flexformElement);
                     if (!empty($fieldConfig)) {
-                        break(2);
+                        break 2;
                     }
                 }
             }
index 4f0d874..39223c6 100644 (file)
@@ -976,7 +976,7 @@ class RecordHistory
             );
         }
 
-        return ($this->pageAccessCache[$pageId] !== false);
+        return $this->pageAccessCache[$pageId] !== false;
     }
 
     /**
index bf9e6cb..b4b2f0e 100644 (file)
@@ -137,7 +137,7 @@ class RequestHandler implements RequestHandlerInterface
      */
     public function canHandleRequest(ServerRequestInterface $request)
     {
-        return (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_BE && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI));
+        return TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_BE && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI);
     }
 
     /**
index bdd2366..d7d1317 100644 (file)
@@ -483,7 +483,7 @@ abstract class AbstractRecordList
             if ($launchViewParameter !== '') {
                 $htmlCode .= ' onclick="' . htmlspecialchars(('top.launchView(' . $launchViewParameter . '); return false;')) . '"';
             }
-            $htmlCode .= ' title="' . htmlspecialchars($this->getLanguageService()->sl('LLL:EXT:backend/Resources/Private/Language/locallang.xlf:show_references') . ' (' .  $references . ')') . '">';
+            $htmlCode .= ' title="' . htmlspecialchars($this->getLanguageService()->sl('LLL:EXT:backend/Resources/Private/Language/locallang.xlf:show_references') . ' (' . $references . ')') . '">';
             $htmlCode .= $references;
             $htmlCode .= '</a>';
         }
index 9dfd874..cb96483 100644 (file)
@@ -127,7 +127,7 @@ class HelpButton implements ButtonInterface, PositionInterface
      */
     public function isValid()
     {
-        return (!empty($this->moduleName));
+        return !empty($this->moduleName);
     }
 
     /**
index fdce532..14db2a1 100644 (file)
@@ -191,9 +191,9 @@ class ShortcutButton implements ButtonInterface, PositionInterface
     {
         $this->preProcess();
 
-        return (
+        return
             !empty($this->moduleName)
-        );
+        ;
     }
 
     /**
index e6b1957..99ebfbf 100644 (file)
@@ -82,7 +82,7 @@ class FullyRenderedButton implements ButtonInterface
     {
         if (
             trim($this->getHtmlSource()) !== ''
-            && $this->getType() === FullyRenderedButton::class
+            && $this->getType() === self::class
         ) {
             return true;
         }
index 46500a7..b014a1e 100644 (file)
@@ -132,7 +132,7 @@ class InputButton extends AbstractButton implements ButtonInterface
             trim($this->getName()) !== ''
             && trim($this->getValue()) !== ''
             && trim($this->getTitle()) !== ''
-            && $this->getType() === InputButton::class
+            && $this->getType() === self::class
             && $this->getIcon() !== null
         ) {
             return true;
index f90c8a6..46e9855 100644 (file)
@@ -74,7 +74,7 @@ class LinkButton extends AbstractButton implements ButtonInterface
         if (
             trim($this->getHref()) !== ''
             && trim($this->getTitle()) !== ''
-            && $this->getType() === LinkButton::class
+            && $this->getType() === self::class
             && $this->getIcon() !== null
         ) {
             return true;
index cff0b1f..54d5aea 100644 (file)
@@ -137,6 +137,6 @@ class Menu
      */
     public function isValid(Menu $menu)
     {
-        return (trim($menu->getIdentifier()) !== '');
+        return trim($menu->getIdentifier()) !== '';
     }
 }
index ce75ba8..5b28cae 100644 (file)
@@ -336,7 +336,7 @@ class ExtdirectTreeCommands
             // Clean JSON-serialized ampersands ('&')
             // @see GeneralUtility::quoteJSvalue()
             $extractedLink = json_decode('"' . trim($match[1], '"') . '"', JSON_HEX_AMP);
-        };
+        }
         return $extractedLink;
     }
 
index 8382f82..82b39f5 100644 (file)
@@ -264,11 +264,11 @@ class PagetreeNode extends \TYPO3\CMS\Backend\Tree\ExtDirectNode
      */
     public function canBeCut()
     {
-        return (
+        return
             $this->canEdit($this->record)
             && !VersionState::cast($this->record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
             && $GLOBALS['BE_USER']->checkLanguageAccess(0)
-        );
+        ;
     }
 
     /**
@@ -288,11 +288,11 @@ class PagetreeNode extends \TYPO3\CMS\Backend\Tree\ExtDirectNode
      */
     public function canBeCopied()
     {
-        return (
+        return
             $GLOBALS['BE_USER']->doesUserHaveAccess($this->record, 1)
             && !VersionState::cast($this->record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
             && $GLOBALS['BE_USER']->checkLanguageAccess(0)
-        );
+        ;
     }
 
     /**
@@ -312,11 +312,11 @@ class PagetreeNode extends \TYPO3\CMS\Backend\Tree\ExtDirectNode
      */
     public function canBeRemoved()
     {
-        return (
+        return
             $this->canRemove($this->record)
             && !VersionState::cast($this->record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
             && $GLOBALS['BE_USER']->checkLanguageAccess(0)
-        );
+        ;
     }
 
     /**
@@ -326,11 +326,11 @@ class PagetreeNode extends \TYPO3\CMS\Backend\Tree\ExtDirectNode
      */
     public function canBePastedInto()
     {
-        return (
+        return
             $this->canCreate($this->record)
             && !VersionState::cast($this->record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
             && $GLOBALS['BE_USER']->checkLanguageAccess(0)
-        );
+        ;
     }
 
     /**
@@ -340,11 +340,11 @@ class PagetreeNode extends \TYPO3\CMS\Backend\Tree\ExtDirectNode
      */
     public function canBePastedAfter()
     {
-        return (
+        return
             $this->canCreate($this->record)
             && !VersionState::cast($this->record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
             && $GLOBALS['BE_USER']->checkLanguageAccess(0)
-        );
+        ;
     }
 
     /**
@@ -394,10 +394,10 @@ class PagetreeNode extends \TYPO3\CMS\Backend\Tree\ExtDirectNode
      */
     public function isDeleted()
     {
-        return (
+        return
             !empty($this->record['deleted'])
             || VersionState::cast($this->record['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)
-        );
+        ;
     }
 
     /**
index 5eafa77..ea44d01 100644 (file)
@@ -2351,7 +2351,7 @@ class BackendUtility
                             foreach (GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$theColConf['foreign_table']]['ctrl']['label_alt'], true) as $f) {
                                 $MMfields[] = $theColConf['foreign_table'] . '.' . $f;
                             }
-                            $MMfield = join(',', $MMfields);
+                            $MMfield = implode(',', $MMfields);
                         }
                         /** @var $dbGroup RelationHandler */
                         $dbGroup = GeneralUtility::makeInstance(RelationHandler::class);
@@ -2449,7 +2449,7 @@ class BackendUtility
                                         $MMfields[] = $theColConf['foreign_table'] . '.' . $f;
                                     }
                                 }
-                                $MMfield = join(',', $MMfields);
+                                $MMfield = implode(',', $MMfields);
                             }
                             /** @var $dbGroup RelationHandler */
                             $dbGroup = GeneralUtility::makeInstance(RelationHandler::class);
@@ -3054,7 +3054,7 @@ class BackendUtility
             'uPT' => 1,
             'vC' => static::getBackendUserAuthentication()->veriCode()
         ];
-        $url = BackendUtility::getModuleUrl('tce_db', $urlParameters) . $parameters . '&redirect=';
+        $url = self::getModuleUrl('tce_db', $urlParameters) . $parameters . '&redirect=';
         if ((int)$redirectUrl === -1) {
             $url = GeneralUtility::quoteJSvalue($url) . '+T3_THIS_LOCATION';
         } else {
@@ -4267,7 +4267,7 @@ class BackendUtility
                 $outputRows[] = $row;
             } else {
                 // Select UID version:
-                $row = BackendUtility::getRecord($table, $uid, $fields, '', !$includeDeletedRecords);
+                $row = self::getRecord($table, $uid, $fields, '', !$includeDeletedRecords);
                 // Add rows to output array:
                 if ($row) {
                     $row['_CURRENT_VERSION'] = true;
@@ -4744,7 +4744,7 @@ class BackendUtility
             // -2 means "show at any login". We simulate first available fe_group.
             /** @var PageRepository $sysPage */
             $sysPage = GeneralUtility::makeInstance(PageRepository::class);
-            $activeFeGroupRow = BackendUtility::getRecordRaw('fe_groups', '1=1' . $sysPage->enableFields('fe_groups'), 'uid');
+            $activeFeGroupRow = self::getRecordRaw('fe_groups', '1=1' . $sysPage->enableFields('fe_groups'), 'uid');
             if (!empty($activeFeGroupRow)) {
                 $simUser = '&ADMCMD_simUser=' . $activeFeGroupRow['uid'];
             }
index 3f28e3f..3d58c39 100644 (file)
@@ -399,22 +399,22 @@ class IconUtility
                     }
                     // Converting to gray scale, dimming the icon:
                     if ($mode == 'disabled' or $mode != 'futuretiming' && $mode != 'no_icon_found' && !(!$mode && $user)) {
-                        $totalImageColors = ImageColorsTotal($im);
+                        $totalImageColors = imagecolorstotal($im);
                         for ($c = 0; $c < $totalImageColors; $c++) {
-                            $cols = ImageColorsForIndex($im, $c);
+                            $cols = imagecolorsforindex($im, $c);
                             $newcol = round(($cols['red'] + $cols['green'] + $cols['blue']) / 3);
                             $lighten = $mode == 'disabled' ? 2.5 : 2;
                             $newcol = round(255 - (255 - $newcol) / $lighten);
-                            ImageColorSet($im, $c, $newcol, $newcol, $newcol);
+                            imagecolorset($im, $c, $newcol, $newcol, $newcol);
                         }
                     }
                     // Applying user icon, if there are access control on the item:
                     if ($user) {
                         if ($user < 100) {
                             // Apply user number only if lower than 100
-                            $black = ImageColorAllocate($im, 0, 0, 0);
+                            $black = imagecolorallocate($im, 0, 0, 0);
                             imagefilledrectangle($im, 0, 0, $user > 10 ? 9 : 5, 8, $black);
-                            $white = ImageColorAllocate($im, 255, 255, 255);
+                            $white = imagecolorallocate($im, 255, 255, 255);
                             imagestring($im, 1, 1, 1, $user, $white);
                         }
                         $ol_im = self::imagecreatefrom($GLOBALS['BACK_PATH'] . 'typo3/sysext/backend/Resources/Public/Images/Overlay/overlay_group.gif');
@@ -473,7 +473,7 @@ class IconUtility
                     }
                     @self::imagemake($im, $path);
                     GraphicalFunctions::gifCompress($path, 'IM');
-                    ImageDestroy($im);
+                    imagedestroy($im);
 
                     return $mainpath;
                 } else {
@@ -544,9 +544,9 @@ class IconUtility
     public static function imagemake($im, $path)
     {
         if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']) {
-            @ImagePng($im, $path);
+            @imagepng($im, $path);
         } else {
-            @ImageGif($im, $path);
+            @imagegif($im, $path);
         }
         if (@is_file($path)) {
             GeneralUtility::fixPermissions($path);
index 26ff510..4585fcb 100644 (file)
@@ -58,7 +58,7 @@ class BackendLayout
     public static function create($identifier, $title, $configuration)
     {
         return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-            BackendLayout::class,
+            self::class,
             $identifier,
             $title,
             $configuration
index 2d509c8..3394c2b 100644 (file)
@@ -314,7 +314,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
             $pKey = $this->getPageLayoutController()->MOD_SETTINGS['pages'];
             switch ($pKey) {
                 case 1:
-                    $this->fieldArray = ['title','uid'] + array_keys($this->cleanTableNames());
+                    $this->fieldArray = ['title', 'uid'] + array_keys($this->cleanTableNames());
                     break;
                 case 2:
                     $this->fieldArray = [
index bfe9527..a50a9c6 100644 (file)
@@ -273,28 +273,28 @@ class ThumbnailView
             $im = imagecreatefromgif($basePath . 'NotFound.gif');
         }
         // Sets background color and print color.
-        $white = imageColorAllocate($im, 255, 255, 255);
-        $black = imageColorAllocate($im, 0, 0, 0);
+        $white = imagecolorallocate($im, 255, 255, 255);
+        $black = imagecolorallocate($im, 0, 0, 0);
         // Prints the text strings with the build-in font functions of GD
         $x = 0;
         $font = 0;
         if ($l1) {
             imagefilledrectangle($im, $x, 9, 56, 16, $white);
-            imageString($im, $font, $x, 9, $l1, $black);
+            imagestring($im, $font, $x, 9, $l1, $black);
         }
         if ($l2) {
             imagefilledrectangle($im, $x, 19, 56, 26, $white);
-            imageString($im, $font, $x, 19, $l2, $black);
+            imagestring($im, $font, $x, 19, $l2, $black);
         }
         if ($l3) {
             imagefilledrectangle($im, $x, 29, 56, 36, $white);
-            imageString($im, $font, $x, 29, substr($l3, -14), $black);
+            imagestring($im, $font, $x, 29, substr($l3, -14), $black);
         }
         // Outputting the image stream and exit
         if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']) {
-            imagePng($im);
+            imagepng($im);
         } else {
-            imageGif($im);
+            imagegif($im);
         }
         imagedestroy($im);
         die;
@@ -315,9 +315,9 @@ class ThumbnailView
             throw new \RuntimeException('TYPO3 Fatal Error: No gdlib.', 1270853953);
         }
         // Create image and set background color to white.
-        $im = imageCreate(250, 76);
-        $white = imageColorAllocate($im, 255, 255, 255);
-        $col = imageColorAllocate($im, 0, 0, 0);
+        $im = imagecreate(250, 76);
+        $white = imagecolorallocate($im, 255, 255, 255);
+        $col = imagecolorallocate($im, 0, 0, 0);
         // The test string and offset in x-axis.
         $string = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÆæØøÅåÄäÖöÜüß';
         $x = 13;
@@ -336,10 +336,10 @@ class ThumbnailView
         // Output PNG or GIF based on $GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']
         if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png']) {
             header('Content-type: image/png');
-            imagePng($im);
+            imagepng($im);
         } else {
             header('Content-type: image/gif');
-            imageGif($im);
+            imagegif($im);
         }
         imagedestroy($im);
         die;
index eb19f7e..9b8bfd7 100644 (file)
@@ -103,6 +103,6 @@ class InputTextElementTest extends UnitTestCase
         $nodeFactoryProphecy = $this->prophesize(NodeFactory::class)->reveal();
         $subject = new InputTextElement($nodeFactoryProphecy, $data);
         $result = $subject->render();
-        $this->assertContains('<input type="hidden" name="" value="' . $expectedOutput  . '" />', $result['html']);
+        $this->assertContains('<input type="hidden" name="" value="' . $expectedOutput . '" />', $result['html']);
     }
 }
index 87d0895..cc4483f 100644 (file)
@@ -51,7 +51,7 @@ class DatabasePageLanguageOverlayRowsTest extends UnitTestCase
     {
         $this->dbProphecy->exec_SELECTgetRows(Argument::cetera())->willReturn(null);
         $this->dbProphecy->sql_error(Argument::cetera())->willReturn(null);
-        $this->setExpectedException(\UnexpectedValueException::class,  $this->anything(), 1440777705);
+        $this->setExpectedException(\UnexpectedValueException::class, $this->anything(), 1440777705);
         $this->subject->addData(['effectivePid' => 1]);
     }
 
index d30f771..a73ab82 100644 (file)
@@ -70,7 +70,7 @@ class DatabaseSystemLanguageRowsTest extends UnitTestCase
     {
         $this->dbProphecy->exec_SELECTgetRows(Argument::cetera())->willReturn(null);
         $this->dbProphecy->sql_error(Argument::cetera())->willReturn(null);
-        $this->setExpectedException(\UnexpectedValueException::class,  $this->anything(), 1438170741);
+        $this->setExpectedException(\UnexpectedValueException::class, $this->anything(), 1438170741);
         $this->subject->addData([]);
     }
 
index b31d243..a93c33e 100644 (file)
@@ -69,7 +69,7 @@ class TcaColumnsProcessRecordTitleTest extends UnitTestCase
         ];
 
         $expected = $input;
-        $expected['columnsToProcess'] = ['uid','aField','anotherField'];
+        $expected['columnsToProcess'] = ['uid', 'aField', 'anotherField'];
         $this->assertSame($expected, $this->subject->addData($input));
     }
 
index deb0b46..541b9b2 100644 (file)
@@ -2554,7 +2554,7 @@ This is a dump of the failures:
      */
     public function logoff()
     {
-        if (isset($GLOBALS['BE_USER']) && $GLOBALS['BE_USER'] instanceof BackendUserAuthentication && isset($GLOBALS['BE_USER']->user['uid'])) {
+        if (isset($GLOBALS['BE_USER']) && $GLOBALS['BE_USER'] instanceof self && isset($GLOBALS['BE_USER']->user['uid'])) {
             \TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get()->clean();
         }
         parent::logoff();
index 8a99f73..fe4dc57 100644 (file)
@@ -217,7 +217,7 @@ class RedisBackend extends AbstractBackend implements TaggableBackendInterface
      */
     public function setDatabase($database)
     {
-        if (!is_integer($database)) {
+        if (!is_int($database)) {
             throw new \InvalidArgumentException('The specified database number is of type "' . gettype($database) . '" but an integer is expected.', 1279763057);
         }
         if ($database < 0) {
@@ -266,7 +266,7 @@ class RedisBackend extends AbstractBackend implements TaggableBackendInterface
      */
     public function setCompressionLevel($compressionLevel)
     {
-        if (!is_integer($compressionLevel)) {
+        if (!is_int($compressionLevel)) {
             throw new \InvalidArgumentException('The specified compression of type "' . gettype($compressionLevel) . '" but an integer is expected.', 1289679154);
         }
         if ($compressionLevel >= -1 && $compressionLevel <= 9) {
@@ -300,7 +300,7 @@ class RedisBackend extends AbstractBackend implements TaggableBackendInterface
             throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1279469941);
         }
         $lifetime = $lifetime === null ? $this->defaultLifetime : $lifetime;
-        if (!is_integer($lifetime)) {
+        if (!is_int($lifetime)) {
             throw new \InvalidArgumentException('The specified lifetime is of type "' . gettype($lifetime) . '" but an integer or NULL is expected.', 1279488008);
         }
         if ($lifetime < 0) {
index 2988436..20cb8e1 100644 (file)
@@ -77,7 +77,7 @@ class VariableFrontend extends AbstractFrontend
             }
         }
         if ($this->backend instanceof TransientBackendInterface) {
-                $this->backend->set($entryIdentifier, $variable, $tags, $lifetime);
+            $this->backend->set($entryIdentifier, $variable, $tags, $lifetime);
         } else {
             if ($this->useIgBinary === true) {
                 $this->backend->set($entryIdentifier, igbinary_serialize($variable), $tags, $lifetime);
index 545d035..2a3bf8d 100644 (file)
@@ -52,7 +52,7 @@ class CategoryCollection extends AbstractRecordCollection implements EditableCol
         if (!empty($tableName)) {
             $this->setItemTableName($tableName);
         } elseif (empty($this->itemTableName)) {
-            throw new \RuntimeException(CategoryCollection::class . ' needs a valid itemTableName.', 1341826168);
+            throw new \RuntimeException(self::class . ' needs a valid itemTableName.', 1341826168);
         }
         if (!empty($fieldName)) {
             $this->setRelationFieldName($fieldName);
@@ -71,7 +71,7 @@ class CategoryCollection extends AbstractRecordCollection implements EditableCol
     {
         /** @var $collection CategoryCollection */
         $collection = GeneralUtility::makeInstance(
-            CategoryCollection::class,
+            self::class,
             $collectionRecord['table_name'],
             $collectionRecord['field_name']
         );
index 4b1533e..cf74e5c 100644 (file)
@@ -1296,7 +1296,7 @@ class CharsetConverter
                     array_push($code_decomp, chr($ord));
                 }
             }
-            $ascii[$this->UnumberToChar(hexdec($from))] = join('', $code_decomp);
+            $ascii[$this->UnumberToChar(hexdec($from))] = implode('', $code_decomp);
         }
         // Add numeric decompositions
         foreach ($number as $from => $to) {
@@ -1754,7 +1754,7 @@ class CharsetConverter
         /** @var Locales $locales */
         $locales = GeneralUtility::makeInstance(Locales::class);
         foreach ($locales->getIsoMapping() as $typo3Lang => $isoLang) {
-            $isoLang = join('-', explode('_', $isoLang));
+            $isoLang = implode('-', explode('_', $isoLang));
             $allLanguageCodes[$typo3Lang] = $isoLang;
         }
         // Move the iso codes to the (because we're comparing the keys with "isset" later on)
index 66feb8b..798e4a0 100644 (file)
@@ -31,7 +31,7 @@ class StaticRecordCollection extends AbstractRecordCollection implements Editabl
     {
         /** @var $collection StaticRecordCollection */
         $collection = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-            StaticRecordCollection::class,
+            self::class,
             $collectionRecord['table_name']
         );
         $collection->fromArray($collectionRecord);
index 06ff44b..2277d75 100644 (file)
@@ -62,7 +62,7 @@ abstract class AbstractConditionMatcher
      */
     public function setPageId($pageId)
     {
-        if (is_integer($pageId) && $pageId > 0) {
+        if (is_int($pageId) && $pageId > 0) {
             $this->pageId = $pageId;
         }
     }
@@ -243,17 +243,17 @@ abstract class AbstractConditionMatcher
                     if (strcspn($test, '=<>') == 0) {
                         switch ($test[0]) {
                             case '=':
-                                if (doubleval(substr($test, 1)) == $browserInfo['version']) {
+                                if (floatval(substr($test, 1)) == $browserInfo['version']) {
                                     return true;
                                 }
                                 break;
                             case '<':
-                                if (doubleval(substr($test, 1)) > $browserInfo['version']) {
+                                if (floatval(substr($test, 1)) > $browserInfo['version']) {
                                     return true;
                                 }
                                 break;
                             case '>':
-                                if (doubleval(substr($test, 1)) < $browserInfo['version']) {
+                                if (floatval(substr($test, 1)) < $browserInfo['version']) {
                                     return true;
                                 }
                                 break;
@@ -504,7 +504,7 @@ abstract class AbstractConditionMatcher
                 }
             }
             $arguments = trim($arguments);
-        };
+        }
         return $result;
     }
 
@@ -569,10 +569,10 @@ abstract class AbstractConditionMatcher
             $rightValue = $matches[2];
             switch ($operator) {
                 case '>=':
-                    return $leftValue >= doubleval($rightValue);
+                    return $leftValue >= floatval($rightValue);
                     break;
                 case '<=':
-                    return $leftValue <= doubleval($rightValue);
+                    return $leftValue <= floatval($rightValue);
                     break;
                 case '!=':
                     // multiple values may be split with '|'
@@ -580,7 +580,7 @@ abstract class AbstractConditionMatcher
                     $found = false;
                     $rightValueParts = GeneralUtility::trimExplode('|', $rightValue);
                     foreach ($rightValueParts as $rightValueSingle) {
-                        if ($leftValue == doubleval($rightValueSingle)) {
+                        if ($leftValue == floatval($rightValueSingle)) {
                             $found = true;
                             break;
                         }
@@ -588,10 +588,10 @@ abstract class AbstractConditionMatcher
                     return $found === false;
                     break;
                 case '<':
-                    return $leftValue < doubleval($rightValue);
+                    return $leftValue < floatval($rightValue);
                     break;
                 case '>':
-                    return $leftValue > doubleval($rightValue);
+                    return $leftValue > floatval($rightValue);
                     break;
                 default:
                     // nothing valid found except '=', use '='
index f934195..7564d01 100644 (file)
@@ -68,7 +68,7 @@ class ApplicationContext
             $contextStringParts = explode('/', $contextString);
             $this->rootContextString = $contextStringParts[0];
             array_pop($contextStringParts);
-            $this->parentContext = new ApplicationContext(implode('/', $contextStringParts));
+            $this->parentContext = new self(implode('/', $contextStringParts));
         }
 
         if (!in_array($this->rootContextString, ['Development', 'Production', 'Testing'])) {
@@ -97,7 +97,7 @@ class ApplicationContext
      */
     public function isDevelopment()
     {
-        return ($this->rootContextString === 'Development');
+        return $this->rootContextString === 'Development';
     }
 
     /**
@@ -108,7 +108,7 @@ class ApplicationContext
      */
     public function isProduction()
     {
-        return ($this->rootContextString === 'Production');
+        return $this->rootContextString === 'Production';
     }
 
     /**
@@ -119,7 +119,7 @@ class ApplicationContext
      */
     public function isTesting()
     {
-        return ($this->rootContextString === 'Testing');
+        return $this->rootContextString === 'Testing';
     }
 
     /**
index 4300c90..7ec5f00 100644 (file)
@@ -2858,7 +2858,7 @@ class DataHandler
                     }
                     $valueArray = explode('.', $value);
                     $dec = array_pop($valueArray);
-                    $value = join('', $valueArray) . '.' . $dec;
+                    $value = implode('', $valueArray) . '.' . $dec;
                     if ($negative) {
                         $value *= -1;
                     }
@@ -4111,7 +4111,7 @@ class DataHandler
             $this->include_filefunctions = 1;
         }
         // Select all RTEmagic files in the reference table from the table/ID
-        $where = join(' AND ', [
+        $where = implode(' AND ', [
             'ref_table=' . $this->databaseConnection->fullQuoteStr('_FILE', 'sys_refindex'),
             'ref_string LIKE ' . $this->databaseConnection->fullQuoteStr('%/RTEmagic%', 'sys_refindex'),
             'softref_key=' . $this->databaseConnection->fullQuoteStr('images', 'sys_refindex'),
@@ -8359,7 +8359,7 @@ class DataHandler
         if (!isset($this->outerMostInstance)) {
             $stack = array_reverse(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS));
             foreach ($stack as $stackItem) {
-                if (isset($stackItem['object']) && $stackItem['object'] instanceof DataHandler) {
+                if (isset($stackItem['object']) && $stackItem['object'] instanceof self) {
                     $this->outerMostInstance = $stackItem['object'];
                     break;
                 }
@@ -8591,4 +8591,4 @@ class DataHandler
     {
         return ResourceFactory::getInstance();
     }
-}
\ No newline at end of file
+}
index 5e13cd8..9e2acd8 100644 (file)
@@ -440,13 +440,13 @@ class QueryGenerator
             // Initialize array to work on, save special parameters
             $ssArr = $this->getSubscript($POST['qG_del']);
             $workArr = &$this->queryConfig;
-            $ssArrSize = sizeof($ssArr) - 1;
+            $ssArrSize = count($ssArr) - 1;
             for ($i = 0; $i < $ssArrSize; $i++) {
                 $workArr = &$workArr[$ssArr[$i]];
             }
             // Delete the entry and move the other entries
             unset($workArr[$ssArr[$i]]);
-            $workArrSize = sizeof($workArr);
+            $workArrSize = count($workArr);
             for ($j = $ssArr[$i]; $j < $workArrSize; $j++) {
                 $workArr[$j] = $workArr[$j + 1];
                 unset($workArr[$j + 1]);
@@ -457,12 +457,12 @@ class QueryGenerator
             // Initialize array to work on, save special parameters
             $ssArr = $this->getSubscript($POST['qG_ins']);
             $workArr = &$this->queryConfig;
-            $ssArrSize = sizeof($ssArr) - 1;
+            $ssArrSize = count($ssArr) - 1;
             for ($i = 0; $i < $ssArrSize; $i++) {
                 $workArr = &$workArr[$ssArr[$i]];
             }
             // Move all entries above position where new entry is to be inserted
-            $workArrSize = sizeof($workArr);
+            $workArrSize = count($workArr);
             for ($j = $workArrSize; $j > $ssArr[$i]; $j--) {
                 $workArr[$j] = $workArr[$j - 1];
             }
@@ -475,7 +475,7 @@ class QueryGenerator
             // Initialize array to work on
             $ssArr = $this->getSubscript($POST['qG_up']);
             $workArr = &$this->queryConfig;
-            $ssArrSize = sizeof($ssArr) - 1;
+            $ssArrSize = count($ssArr) - 1;
             for ($i = 0; $i < $ssArrSize; $i++) {
                 $workArr = &$workArr[$ssArr[$i]];
             }
@@ -489,7 +489,7 @@ class QueryGenerator
             // Initialize array to work on
             $ssArr = $this->getSubscript($POST['qG_nl']);
             $workArr = &$this->queryConfig;
-            $ssArraySize = sizeof($ssArr) - 1;
+            $ssArraySize = count($ssArr) - 1;
             for ($i = 0; $i < $ssArraySize; $i++) {
                 $workArr = &$workArr[$ssArr[$i]];
             }
@@ -510,7 +510,7 @@ class QueryGenerator
             // Initialize array to work on
             $ssArr = $this->getSubscript($POST['qG_remnl']);
             $workArr = &$this->queryConfig;
-            $ssArrSize = sizeof($ssArr) - 1;
+            $ssArrSize = count($ssArr) - 1;
             for ($i = 0; $i < $ssArrSize; $i++) {
                 $workArr = &$workArr[$ssArr[$i]];
             }
@@ -1343,7 +1343,7 @@ class QueryGenerator
                 $inputVal = 0;
             }
         } else {
-            $inputVal = doubleval($conf['inputValue' . $suffix]);
+            $inputVal = floatval($conf['inputValue' . $suffix]);
         }
         return $inputVal;
     }
index 849db15..92a37cb 100644 (file)
@@ -1059,13 +1059,13 @@ class ReferenceIndex
      */
     protected function isDbReferenceField(array $configuration)
     {
-        return (
+        return
             ($configuration['type'] === 'group' && $configuration['internal_type'] === 'db')
             || (
                 ($configuration['type'] === 'select' || $configuration['type'] === 'inline')
                 && !empty($configuration['foreign_table'])
             )
-        );
+        ;
     }
 
     /**
@@ -1076,7 +1076,7 @@ class ReferenceIndex
      */
     public function isReferenceField(array $configuration)
     {
-        return (
+        return
             $this->isDbReferenceField($configuration)
             ||
             ($configuration['type'] === 'group' && ($configuration['internal_type'] === 'file' || $configuration['internal_type'] === 'file_reference')) // getRelations_procFiles
@@ -1092,7 +1092,7 @@ class ReferenceIndex
                 is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['softRefParser_GL'])
                 && !empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['softRefParser_GL'])
             )
-        );
+        ;
     }
 
     /**
@@ -1190,7 +1190,7 @@ class ReferenceIndex
             $uidList = [0];
             while ($record = $databaseConnection->sql_fetch_assoc($res)) {
                 /** @var $refIndexObj ReferenceIndex */
-                $refIndexObj = GeneralUtility::makeInstance(ReferenceIndex::class);
+                $refIndexObj = GeneralUtility::makeInstance(self::class);
                 if (isset($record['t3ver_wsid'])) {
                     $refIndexObj->setWorkspaceId($record['t3ver_wsid']);
                 }
index b86259d..dbd3713 100644 (file)
@@ -1456,7 +1456,7 @@ class HtmlParser
         $tagRegEx = '[^ >]+'; // all characters until you reach a > or space;
         if ($tagList) {
             $tags = preg_split('/,/', $tagList);
-            $tagRegEx = preg_replace('/ */', '', join('|', $tags));
+            $tagRegEx = preg_replace('/ */', '', implode('|', $tags));
         }
         $count = 1;
         $nbspRegex = $treatNonBreakingSpaceAsEmpty ? '|(&nbsp;)' : '';
index 81750bd..a7e478e 100644 (file)
@@ -257,7 +257,7 @@ class Stream implements StreamInterface
             return false;
         }
         $mode = $this->getMetadata('mode');
-        return (strpos($mode, 'r') !== false || strpos($mode, '+') !== false);
+        return strpos($mode, 'r') !== false || strpos($mode, '+') !== false;
     }
 
     /**
index 9e1a8a9..a87051a 100644 (file)
@@ -417,13 +417,13 @@ class GraphicalFunctions
                     $Bcolor = imagecolorallocatealpha($destImg, 0, 0, 0, 127);
                     imagefill($destImg, 0, 0, $Bcolor);
                 } else {
-                    $Bcolor = ImageColorAllocate($destImg, 0, 0, 0);
-                    ImageFilledRectangle($destImg, 0, 0, $w, $h, $Bcolor);
+                    $Bcolor = imagecolorallocate($destImg, 0, 0, 0);
+                    imagefilledrectangle($destImg, 0, 0, $w, $h, $Bcolor);
                 }
                 $this->copyGifOntoGif($destImg, $cpImg, $conf, $workArea);
                 $this->ImageWrite($destImg, $theImage);
-                imageDestroy($cpImg);
-                imageDestroy($destImg);
+                imagedestroy($cpImg);
+                imagedestroy($destImg);
                 // Prepare mask image
                 $cpImg = $this->imageCreateFromFile($BBmask[3]);
                 $destImg = imagecreatetruecolor($w, $h);
@@ -432,13 +432,13 @@ class GraphicalFunctions
                     $Bcolor = imagecolorallocatealpha($destImg, 0, 0, 0, 127);
                     imagefill($destImg, 0, 0, $Bcolor);
                 } else {
-                    $Bcolor = ImageColorAllocate($destImg, 0, 0, 0);
-                    ImageFilledRectangle($destImg, 0, 0, $w, $h, $Bcolor);
+                    $Bcolor = imagecolorallocate($destImg, 0, 0, 0);
+                    imagefilledrectangle($destImg, 0, 0, $w, $h, $Bcolor);
                 }
                 $this->copyGifOntoGif($destImg, $cpImg, $conf, $workArea);
                 $this->ImageWrite($destImg, $theMask);
-                imageDestroy($cpImg);
-                imageDestroy($destImg);
+                imagedestroy($cpImg);
+                imagedestroy($destImg);
                 // Mask the images
                 $this->ImageWrite($im, $theDest);
                 // Let combineExec handle maskNegation
@@ -448,7 +448,7 @@ class GraphicalFunctions
                 // ... and if nothing went wrong we load it onto the old one.
                 if ($backIm) {
                     if (!$this->saveAlphaLayer) {
-                        ImageColorTransparent($backIm, -1);
+                        imagecolortransparent($backIm, -1);
                     }
                     $im = $backIm;
                 }
@@ -480,7 +480,7 @@ class GraphicalFunctions
             }
             $cpImg = $this->imageCreateFromFile($conf['file']);
             $this->copyGifOntoGif($im, $cpImg, $conf, $workArea);
-            imageDestroy($cpImg);
+            imagedestroy($cpImg);
         }
     }
 
@@ -620,7 +620,7 @@ class GraphicalFunctions
             $cols = $this->convertColor($conf['fontColor']);
             // NiceText is calculated
             if (!$conf['niceText']) {
-                $Fcolor = ImageColorAllocate($im, $cols[0], $cols[1], $cols[2]);
+                $Fcolor = imagecolorallocate($im, $cols[0], $cols[1], $cols[2]);
                 // antiAliasing is setup:
                 $Fcolor = $conf['antiAlias'] ? $Fcolor : -$Fcolor;
                 for ($a = 0; $a < $conf['iterations']; $a++) {
@@ -646,9 +646,9 @@ class GraphicalFunctions
                 $newH = ceil($sF * imagesy($im));
                 // Make mask
                 $maskImg = imagecreatetruecolor($newW, $newH);
-                $Bcolor = ImageColorAllocate($maskImg, 255, 255, 255);
-                ImageFilledRectangle($maskImg, 0, 0, $newW, $newH, $Bcolor);
-                $Fcolor = ImageColorAllocate($maskImg, 0, 0, 0);
+                $Bcolor = imagecolorallocate($maskImg, 255, 255, 255);
+                imagefilledrectangle($maskImg, 0, 0, $newW, $newH, $Bcolor);
+                $Fcolor = imagecolorallocate($maskImg, 0, 0, 0);
                 // If any kind of spacing applies, we use this function:
                 if ($spacing || $wordSpacing) {
                     $this->SpacedImageTTFText($maskImg, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, self::prependAbsolutePath($conf['fontFile']), $theText, $spacing, $wordSpacing, $conf['splitRendering.'], $sF);
@@ -656,7 +656,7 @@ class GraphicalFunctions
                     $this->renderTTFText($maskImg, $conf['fontSize'], $conf['angle'], $txtPos[0], $txtPos[1], $Fcolor, $conf['fontFile'], $theText, $conf['splitRendering.'], $conf, $sF);
                 }
                 $this->ImageWrite($maskImg, $fileMask);
-                ImageDestroy($maskImg);
+                imagedestroy($maskImg);
                 // Downscales the mask
                 if ($this->NO_IM_EFFECTS) {
                     $command = trim($this->scalecmd . ' ' . $w . 'x' . $h . '! -negate');
@@ -673,10 +673,10 @@ class GraphicalFunctions
                 $this->imageMagickExec($fileMask, $fileMask, $command);
                 // Make the color-file
                 $colorImg = imagecreatetruecolor($w, $h);
-                $Ccolor = ImageColorAllocate($colorImg, $cols[0], $cols[1], $cols[2]);
-                ImageFilledRectangle($colorImg, 0, 0, $w, $h, $Ccolor);
+                $Ccolor = imagecolorallocate($colorImg, $cols[0], $cols[1], $cols[2]);
+                imagefilledrectangle($colorImg, 0, 0, $w, $h, $Ccolor);
                 $this->ImageWrite($colorImg, $fileColor);
-                ImageDestroy($colorImg);
+                imagedestroy($colorImg);
                 // The mask is applied
                 // The main pictures is saved temporarily
                 $this->ImageWrite($im, $fileMenu);
@@ -686,7 +686,7 @@ class GraphicalFunctions
                 // ... and if nothing went wrong we load it onto the old one.
                 if ($backIm) {
                     if (!$this->saveAlphaLayer) {
-                        ImageColorTransparent($backIm, -1);
+                        imagecolortransparent($backIm, -1);
                     }
                     $im = $backIm;
                 }
@@ -988,7 +988,7 @@ class GraphicalFunctions
                  */
                 $try = 0;
                 do {
-                    $calc = ImageTTFBBox(GeneralUtility::freetypeDpiComp($sF * $strCfg['fontSize']), $angle, $fontFile, $strCfg['str']);
+                    $calc = imagettfbbox(GeneralUtility::freetypeDpiComp($sF * $strCfg['fontSize']), $angle, $fontFile, $strCfg['str']);
                 } while ($calc[2] < 0 && $try++ < 10);
                 // Calculate offsets:
                 if (empty($offsetInfo)) {
@@ -1035,7 +1035,7 @@ class GraphicalFunctions
             // Set custom color if any (only when niceText is off):
             if ($strCfg['color'] && $sF == 1) {
                 $cols = $this->convertColor($strCfg['color']);
-                $colorIndex = ImageColorAllocate($im, $cols[0], $cols[1], $cols[2]);
+                $colorIndex = imagecolorallocate($im, $cols[0], $cols[1], $cols[2]);
                 $colorIndex = $color >= 0 ? $colorIndex : -$colorIndex;
             }
             // Setting xSpaceBefore
@@ -1046,9 +1046,9 @@ class GraphicalFunctions
             $fontFile = self::prependAbsolutePath($strCfg['fontFile']);
             if (is_readable($fontFile)) {
                 // Render part:
-                ImageTTFText($im, GeneralUtility::freetypeDpiComp($sF * $strCfg['fontSize']), $angle, $x, $y, $colorIndex, $fontFile, $strCfg['str']);
+                imagettftext($im, GeneralUtility::freetypeDpiComp($sF * $strCfg['fontSize']), $angle, $x, $y, $colorIndex, $fontFile, $strCfg['str']);
                 // Calculate offset to apply:
-                $wordInf = ImageTTFBBox(GeneralUtility::freetypeDpiComp($sF * $strCfg['fontSize']), $angle, self::prependAbsolutePath($strCfg['fontFile']), $strCfg['str']);
+                $wordInf = imagettfbbox(GeneralUtility::freetypeDpiComp($sF * $strCfg['fontSize']), $angle, self::prependAbsolutePath($strCfg['fontFile']), $strCfg['str']);
                 $x += $wordInf[2] - $wordInf[0] + (int)$splitRendering['compX'] + (int)$strCfg['xSpaceAfter'];
                 $y += $wordInf[5] - $wordInf[7] - (int)$splitRendering['compY'] - (int)$strCfg['ySpaceAfter'];
             } else {
@@ -1456,22 +1456,22 @@ class GraphicalFunctions
             // BlurColor Image laves
             $blurColImg = imagecreatetruecolor($w, $h);
             $bcols = $this->convertColor($conf['color']);
-            $Bcolor = ImageColorAllocate($blurColImg, $bcols[0], $bcols[1], $bcols[2]);
-            ImageFilledRectangle($blurColImg, 0, 0, $w, $h, $Bcolor);
+            $Bcolor = imagecolorallocate($blurColImg, $bcols[0], $bcols[1], $bcols[2]);
+            imagefilledrectangle($blurColImg, 0, 0, $w, $h, $Bcolor);
             $this->ImageWrite($blurColImg, $fileColor);
-            ImageDestroy($blurColImg);
+            imagedestroy($blurColImg);
             // The mask is made: BlurTextImage
             $blurTextImg = imagecreatetruecolor($w + $blurBorder * 2, $h + $blurBorder * 2);
             // Black background
-            $Bcolor = ImageColorAllocate($blurTextImg, 0, 0, 0);
-            ImageFilledRectangle($blurTextImg, 0, 0, $w + $blurBorder * 2, $h + $blurBorder * 2, $Bcolor);
+            $Bcolor = imagecolorallocate($blurTextImg, 0, 0, 0);
+            imagefilledrectangle($blurTextImg, 0, 0, $w + $blurBorder * 2, $h + $blurBorder * 2, $Bcolor);
             $txtConf['fontColor'] = 'white';
             $blurBordArr = [$blurBorder, $blurBorder];
             $this->makeText($blurTextImg, $txtConf, $this->applyOffset($workArea, $blurBordArr));
             // Dump to temporary file
             $this->ImageWrite($blurTextImg, $fileMask);
             // Destroy
-            ImageDestroy($blurTextImg);
+            imagedestroy($blurTextImg);
             $command = '';
             if ($this->V5_EFFECTS) {
                 $command .= $this->v5_blur($blurRate + 1);
@@ -1496,7 +1496,7 @@ class GraphicalFunctions
                 $blurTextImg = imagecreatetruecolor($w, $h);
                 $this->imagecopyresized($blurTextImg, $blurTextImg_tmp, 0, 0, $blurBorder, $blurBorder, $w, $h, $w, $h);
                 // Destroy the temporary mask
-                ImageDestroy($blurTextImg_tmp);
+                imagedestroy($blurTextImg_tmp);
                 // Adjust the mask
                 $intensity = 40;
                 if ($conf['intensity']) {
@@ -1513,7 +1513,7 @@ class GraphicalFunctions
                 // Dump the mask again
                 $this->ImageWrite($blurTextImg, $fileMask);
                 // Destroy the mask
-                ImageDestroy($blurTextImg);
+                imagedestroy($blurTextImg);
                 // The pictures are combined
                 // The main pictures is saved temporarily
                 $this->ImageWrite($im, $fileMenu);
@@ -1523,7 +1523,7 @@ class GraphicalFunctions
                 // ... and if nothing went wrong we load it onto the old one.
                 if ($backIm) {
                     if (!$this->saveAlphaLayer) {
-                        ImageColorTransparent($backIm, -1);
+                        imagecolortransparent($backIm, -1);
                     }
                     $im = $backIm;
                 }
@@ -1566,7 +1566,7 @@ class GraphicalFunctions
             $opacity = abs($opacity - 100);
             $opacity = round(127 * $opacity / 100);
         }
-        $tmpColor = ImageColorAllocateAlpha($im, $cols[0], $cols[1], $cols[2], $opacity);
+        $tmpColor = imagecolorallocatealpha($im, $cols[0], $cols[1], $cols[2], $opacity);
         imagefilledrectangle($im, $cords[0], $cords[1], $cords[0] + $cords[2] - 1, $cords[1] + $cords[3] - 1, $tmpColor);
     }
 
@@ -1641,7 +1641,7 @@ class GraphicalFunctions
             $effect = strtolower(trim($pairs[0]));
             switch ($effect) {
                 case 'gamma':
-                    $commands .= ' -gamma ' . doubleval($value);
+                    $commands .= ' -gamma ' . floatval($value);
                     break;
                 case 'blur':
                     if (!$this->NO_IM_EFFECTS) {
@@ -1759,8 +1759,8 @@ class GraphicalFunctions
         $cords = $this->objPosition($conf, $this->workArea, [$cords[2], $cords[3]]);
         $newIm = imagecreatetruecolor($cords[2], $cords[3]);
         $cols = $this->convertColor($conf['backColor'] ? $conf['backColor'] : $this->setup['backColor']);
-        $Bcolor = ImageColorAllocate($newIm, $cols[0], $cols[1], $cols[2]);
-        ImageFilledRectangle($newIm, 0, 0, $cords[2], $cords[3], $Bcolor);
+        $Bcolor = imagecolorallocate($newIm, $cols[0], $cols[1], $cols[2]);
+        imagefilledrectangle($newIm, 0, 0, $cords[2], $cords[3], $Bcolor);
         $newConf = [];
         $workArea = [0, 0, $cords[2], $cords[3]];
         if ($cords[0] < 0) {
@@ -1798,7 +1798,7 @@ class GraphicalFunctions
             $theNewFile = $this->imageMagickConvert($theFile, $this->gifExtension, $conf['width'], $conf['height'], $conf['params']);
             $tmpImg = $this->imageCreateFromFile($theNewFile[3]);
             if ($tmpImg) {
-                ImageDestroy($im);
+                imagedestroy($im);
                 $im = $tmpImg;
                 $this->w = imagesx($im);
                 $this->h = imagesy($im);
@@ -1848,11 +1848,11 @@ class GraphicalFunctions
      */
     public function autolevels(&$im)
     {
-        $totalCols = ImageColorsTotal($im);
+        $totalCols = imagecolorstotal($im);
         $min = 255;
         $max = 0;
         for ($c = 0; $c < $totalCols; $c++) {
-            $cols = ImageColorsForIndex($im, $c);
+            $cols = imagecolorsforindex($im, $c);
             $grayArr[] = round(($cols['red'] + $cols['green'] + $cols['blue']) / 3);
         }
         $min = min($grayArr);
@@ -1860,11 +1860,11 @@ class GraphicalFunctions
         $delta = $max - $min;
         if ($delta) {
             for ($c = 0; $c < $totalCols; $c++) {
-                $cols = ImageColorsForIndex($im, $c);
+                $cols = imagecolorsforindex($im, $c);
                 $cols['red'] = floor(($cols['red'] - $min) / $delta * 255);
                 $cols['green'] = floor(($cols['green'] - $min) / $delta * 255);
                 $cols['blue'] = floor(($cols['blue'] - $min) / $delta * 255);
-                ImageColorSet($im, $c, $cols['red'], $cols['green'], $cols['blue']);
+                imagecolorset($im, $c, $cols['red'], $cols['green'], $cols['blue']);
             }
         }
     }
@@ -1889,13 +1889,13 @@ class GraphicalFunctions
                 $high = 255 - $temp;
             }
             $delta = $high - $low;
-            $totalCols = ImageColorsTotal($im);
+            $totalCols = imagecolorstotal($im);
             for ($c = 0; $c < $totalCols; $c++) {
-                $cols = ImageColorsForIndex($im, $c);
+                $cols = imagecolorsforindex($im, $c);
                 $cols['red'] = $low + floor($cols['red'] / 255 * $delta);
                 $cols['green'] = $low + floor($cols['green'] / 255 * $delta);
                 $cols['blue'] = $low + floor($cols['blue'] / 255 * $delta);
-                ImageColorSet($im, $c, $cols['red'], $cols['green'], $cols['blue']);
+                imagecolorset($im, $c, $cols['red'], $cols['green'], $cols['blue']);
             }
         }
     }
@@ -1914,13 +1914,13 @@ class GraphicalFunctions
             $low = MathUtility::forceIntegerInRange($low, 0, 255);
             $high = MathUtility::forceIntegerInRange($high, 0, 255);
             $delta = $high - $low;
-            $totalCols = ImageColorsTotal($im);
+            $totalCols = imagecolorstotal($im);
             for ($c = 0; $c < $totalCols; $c++) {
-                $cols = ImageColorsForIndex($im, $c);
+                $cols = imagecolorsforindex($im, $c);
                 $cols['red'] = MathUtility::forceIntegerInRange(($cols['red'] - $low) / $delta * 255, 0, 255);
                 $cols['green'] = MathUtility::forceIntegerInRange(($cols['green'] - $low) / $delta * 255, 0, 255);
                 $cols['blue'] = MathUtility::forceIntegerInRange(($cols['blue'] - $low) / $delta * 255, 0, 255);
-                ImageColorSet($im, $c, $cols['red'], $cols['green'], $cols['blue']);
+                imagecolorset($im, $c, $cols['red'], $cols['green'], $cols['blue']);
             }
         }
     }
@@ -2053,9 +2053,9 @@ class GraphicalFunctions
         $string = $cParts[0];
         if (strstr($string, '#')) {
             $string = preg_replace('/[^A-Fa-f0-9]*/', '', $string);
-            $col[] = HexDec(substr($string, 0, 2));
-            $col[] = HexDec(substr($string, 2, 2));
-            $col[] = HexDec(substr($string, 4, 2));
+            $col[] = hexdec(substr($string, 0, 2));
+            $col[] = hexdec(substr($string, 2, 2));
+            $col[] = hexdec(substr($string, 4, 2));
         } elseif (strstr($string, ',')) {
             $string = preg_replace('/[^,0-9]*/', '', $string);
             $strArr = explode(',', $string);
@@ -2074,7 +2074,7 @@ class GraphicalFunctions
         if (trim($cParts[1])) {
             $cParts[1] = trim($cParts[1]);
             if ($cParts[1][0] === '*') {
-                $val = doubleval(substr($cParts[1], 1));
+                $val = floatval(substr($cParts[1], 1));
                 $col[0] = MathUtility::forceIntegerInRange($col[0] * $val, 0, 255);
                 $col[1] = MathUtility::forceIntegerInRange($col[1] * $val, 0, 255);
                 $col[2] = MathUtility::forceIntegerInRange($col[2] * $val, 0, 255);
@@ -2671,9 +2671,9 @@ class GraphicalFunctions
                 GeneralUtility::fixPermissions($theFile);
             }
         } elseif (($type === 'GD' || !$type) && $gfxConf['gdlib'] && !$gfxConf['gdlib_png']) {
-            $tempImage = imageCreateFromGif($theFile);
-            imageGif($tempImage, $theFile);
-            imageDestroy($tempImage);
+            $tempImage = imagecreatefromgif($theFile);
+            imagegif($tempImage, $theFile);
+            imagedestroy($tempImage);
             $returnCode = 'GD';
             if (@is_file($theFile)) {
                 GeneralUtility::fixPermissions($theFile);
@@ -2788,7 +2788,7 @@ class GraphicalFunctions
         $this->imageMagickExec($theFile, $theFile, $command);
         $tmpImg = $this->imageCreateFromFile($theFile);
         if ($tmpImg) {
-            ImageDestroy($im);
+            imagedestroy($im);
             $im = $tmpImg;
             $this->w = imagesx($im);
             $this->h = imagesy($im);
@@ -2873,7 +2873,7 @@ class GraphicalFunctions
      */
     public function destroy()
     {
-        ImageDestroy($this->im);
+        imagedestroy($this->im);
     }
 
     /**
@@ -2909,18 +2909,18 @@ class GraphicalFunctions
                     if ($quality == 0) {
                         $quality = $this->jpegQuality;
                     }
-                    $result = imageJpeg($destImg, $theImage, $quality);
+                    $result = imagejpeg($destImg, $theImage, $quality);
                 }
                 break;
             case 'gif':
                 if (function_exists('imageGif')) {
                     imagetruecolortopalette($destImg, true, 256);
-                    $result = imageGif($destImg, $theImage);
+                    $result = imagegif($destImg, $theImage);
                 }
                 break;
             case 'png':
                 if (function_exists('imagePng')) {
-                    $result = ImagePng($destImg, $theImage);
+                    $result = imagepng($destImg, $theImage);
                 }
                 break;
         }
@@ -2944,12 +2944,12 @@ class GraphicalFunctions
         switch ($ext) {
             case 'gif':
                 if (function_exists('imagecreatefromgif')) {
-                    return imageCreateFromGif($sourceImg);
+                    return imagecreatefromgif($sourceImg);
                 }
                 break;
             case 'png':
                 if (function_exists('imagecreatefrompng')) {
-                    $imageHandle = imageCreateFromPng($sourceImg);
+                    $imageHandle = imagecreatefrompng($sourceImg);
                     if ($this->saveAlphaLayer) {
                         imagesavealpha($imageHandle, true);
                     }
@@ -2960,15 +2960,15 @@ class GraphicalFunctions
 
             case 'jpeg':
                 if (function_exists('imagecreatefromjpeg')) {
-                    return imageCreateFromJpeg($sourceImg);
+                    return imagecreatefromjpeg($sourceImg);
                 }
                 break;
         }
         // If non of the above:
         $i = @getimagesize($sourceImg);
         $im = imagecreatetruecolor($i[0], $i[1]);
-        $Bcolor = ImageColorAllocate($im, 128, 128, 128);
-        ImageFilledRectangle($im, 0, 0, $i[0], $i[1], $Bcolor);
+        $Bcolor = imagecolorallocate($im, 128, 128, 128);
+        imagefilledrectangle($im, 0, 0, $i[0], $i[1], $Bcolor);
         return $im;
     }
 
@@ -3031,9 +3031,9 @@ class GraphicalFunctions
             if ($tmpImg) {
                 $img = $tmpImg;
                 if ($closest) {
-                    $retCol = ImageColorClosest($img, $firstColArr[0], $firstColArr[1], $firstColArr[2]);
+                    $retCol = imagecolorclosest($img, $firstColArr[0], $firstColArr[1], $firstColArr[2]);
                 } else {
-                    $retCol = ImageColorExact($img, $firstColArr[0], $firstColArr[1], $firstColArr[2]);
+                    $retCol = imagecolorexact($img, $firstColArr[0], $firstColArr[1], $firstColArr[2]);
                 }
             }
             // Unlink files from process
@@ -3074,28 +3074,28 @@ class GraphicalFunctions
             $im = imagecreatefromgif($basePath . 'NotFound.gif');
         }
         // Sets background color and print color.
-        $white = imageColorAllocate($im, 255, 255, 255);
-        $black = imageColorAllocate($im, 0, 0, 0);
+        $white = imagecolorallocate($im, 255, 255, 255);
+        $black = imagecolorallocate($im, 0, 0, 0);
         // Prints the text strings with the build-in font functions of GD
         $x = 0;
         $font = 0;
         if ($textline1) {
             imagefilledrectangle($im, $x, 9, 56, 16, $white);
-            imageString($im, $font, $x, 9, $textline1, $black);
+            imagestring($im, $font, $x, 9, $textline1, $black);
         }
         if ($textline2) {
             imagefilledrectangle($im, $x, 19, 56, 26, $white);
-            imageString($im, $font, $x, 19, $textline2, $black);
+            imagestring($im, $font, $x, 19, $textline2, $black);
         }
         if ($textline3) {
             imagefilledrectangle($im, $x, 29, 56, 36, $white);
-            imageString($im, $font, $x, 29, substr($textline3, -14), $black);
+            imagestring($im, $font, $x, 29, substr($textline3, -14), $black);
         }
         // Outputting the image stream and exit
         if (!empty($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib_png'])) {
-            imagePng($im, $filename);
+            imagepng($im, $filename);
         } else {
-            imageGif($im, $filename);
+            imagegif($im, $filename);
         }
     }
 }
index d1b9059..7a34475 100644 (file)
@@ -320,8 +320,8 @@ class IconFactory
         }
 
         // Hook to define an alternative iconName
-        if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][IconFactory::class]['overrideIconOverlay'])) {
-            $hookObjects = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][IconFactory::class]['overrideIconOverlay'];
+        if (!empty($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['overrideIconOverlay'])) {
+            $hookObjects = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['overrideIconOverlay'];
             foreach ($hookObjects as $classRef) {
                 $hookObject = GeneralUtility::getUserObj($classRef);
                 if (method_exists($hookObject, 'postOverlayPriorityLookup')) {
@@ -501,7 +501,7 @@ class IconFactory
         $overlayIdentifier
     ) {
         $result = $this->getSignalSlotDispatcher()->dispatch(
-            IconFactory::class,
+            self::class,
             'buildIconForResourceSignal',
             [$resource, $size, $options, $iconIdentifier, $overlayIdentifier]
         );
index 5280b72..d61281d 100644 (file)
@@ -140,7 +140,7 @@ class Locales implements \TYPO3\CMS\Core\SingletonInterface
     public static function initialize()
     {
         /** @var $instance Locales */
-        $instance = GeneralUtility::makeInstance(Locales::class);
+        $instance = GeneralUtility::makeInstance(self::class);
         $instance->isoMapping = array_flip($instance->isoReverseMapping);
         // Allow user-defined locales
         if (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['localization']['locales']['user']) && is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['localization']['locales']['user'])) {
index f4c7a74..f017124 100644 (file)
@@ -63,7 +63,7 @@ class SemaphoreLockStrategy implements LockingStrategyInterface
         if (!is_writable($path)) {
             throw new LockCreateException('Cannot write to directory ' . $path, 1396278700);
         }
-        $this->filePath = $path  . 'sem_' . md5((string)$subject);
+        $this->filePath = $path . 'sem_' . md5((string)$subject);
         touch($this->filePath);
         $this->id = ftok($this->filePath, 'A');
         if ($this->id === false) {
index e403d65..763069a 100644 (file)
@@ -66,7 +66,7 @@ class FileRepository extends AbstractRepository
     {
         $itemList = [];
         if (!\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($uid)) {
-            throw new \InvalidArgumentException('UID of related record has to be an integer. UID given: "' . $uid  . '"', 1316789798);
+            throw new \InvalidArgumentException('UID of related record has to be an integer. UID given: "' . $uid . '"', 1316789798);
         }
         $referenceUids = null;
         if ($this->getEnvironmentMode() === 'FE' && !empty($GLOBALS['TSFE']->sys_page)) {
index 077204e..4967493 100644 (file)
@@ -30,7 +30,7 @@ class OnlineMediaHelperRegistry implements \TYPO3\CMS\Core\SingletonInterface
      */
     public static function getInstance()
     {
-        return GeneralUtility::makeInstance(OnlineMediaHelperRegistry::class);
+        return GeneralUtility::makeInstance(self::class);
     }
 
     /**
index 99253de..4f1386e 100644 (file)
@@ -2403,7 +2403,7 @@ class ResourceStorage implements ResourceStorageInterface
      */
     protected function emitSanitizeFileNameSignal($fileName, Folder $targetFolder)
     {
-        list($fileName) = $this->getSignalSlotDispatcher()->dispatch(ResourceStorage::class, self::SIGNAL_SanitizeFileName, [$fileName, $targetFolder, $this, $this->driver]);
+        list($fileName) = $this->getSignalSlotDispatcher()->dispatch(self::class, self::SIGNAL_SanitizeFileName, [$fileName, $targetFolder, $this, $this->driver]);
         return $fileName;
     }
 
index 0c966a3..7194912 100644 (file)
@@ -361,7 +361,7 @@ class DatabaseTreeDataProvider extends AbstractTableConfigurationTreeDataProvide
      */
     protected function getRelatedRecords(array $row)
     {
-        if ($this->getLookupMode() == DatabaseTreeDataProvider::MODE_PARENT) {
+        if ($this->getLookupMode() == self::MODE_PARENT) {
             $children = $this->getChildrenUidsFromParentRelation($row);
         } else {
             $children = $this->getChildrenUidsFromChildrenRelation($row);
index 0809c1d..ad4c88e 100644 (file)
@@ -202,7 +202,7 @@ class ConfigurationForm extends ExtendedTemplateService
     {
         $iFile = $this->ext_localGfxPrefix . $imgConf;
         $tFile = $this->ext_localWebGfxPrefix . $imgConf;
-        $imageInfo = @getImagesize($iFile);
+        $imageInfo = @getimagesize($iFile);
         return '<img src="' . $tFile . '" ' . $imageInfo[3] . '>';
     }
 
index 466d1aa..ae061fc 100644 (file)
@@ -1147,7 +1147,7 @@ class ExtendedTemplateService extends TemplateService
             }
         }
         if ($iFile !== null) {
-            $imageInfo = @getImagesize($iFile);
+            $imageInfo = @getimagesize($iFile);
             return '<img src="' . $tFile . '" ' . $imageInfo[3] . '>';
         }
         return '';
@@ -1586,17 +1586,17 @@ class ExtendedTemplateService extends TemplateService
                                 if ($var && !GeneralUtility::inList($this->HTMLcolorList, strtolower($var))) {
                                     $var = preg_replace('/[^A-Fa-f0-9]*/', '', $var);
                                     $useFulHex = strlen($var) > 3;
-                                    $col[] = HexDec($var[0]);
-                                    $col[] = HexDec($var[1]);
-                                    $col[] = HexDec($var[2]);
+                                    $col[] = hexdec($var[0]);
+                                    $col[] = hexdec($var[1]);
+                                    $col[] = hexdec($var[2]);
                                     if ($useFulHex) {
-                                        $col[] = HexDec($var[3]);
-                                        $col[] = HexDec($var[4]);
-                                        $col[] = HexDec($var[5]);
+                                        $col[] = hexdec($var[3]);
+                                        $col[] = hexdec($var[4]);
+                                        $col[] = hexdec($var[5]);
                                     }
-                                    $var = substr(('0' . DecHex($col[0])), -1) . substr(('0' . DecHex($col[1])), -1) . substr(('0' . DecHex($col[2])), -1);
+                                    $var = substr(('0' . dechex($col[0])), -1) . substr(('0' . dechex($col[1])), -1) . substr(('0' . dechex($col[2])), -1);
                                     if ($useFulHex) {
-                                        $var .= substr(('0' . DecHex($col[3])), -1) . substr(('0' . DecHex($col[4])), -1) . substr(('0' . DecHex($col[5])), -1);
+                                        $var .= substr(('0' . dechex($col[3])), -1) . substr(('0' . dechex($col[4])), -1) . substr(('0' . dechex($col[5])), -1);
                                     }
                                     $var = '#' . strtoupper($var);
                                 }
index b614173..9138680 100644 (file)
@@ -73,7 +73,7 @@ class ClientUtility
             'aol'
         ];
         $matches = [];
-        $pattern = '#(?P<browser>' . join('|', $known) . ')[/ ]+(?P<version>[0-9]+(?:\\.[0-9]+)?)#';
+        $pattern = '#(?P<browser>' . implode('|', $known) . ')[/ ]+(?P<version>[0-9]+(?:\\.[0-9]+)?)#';
         // Find all phrases (or return empty array if none found)
         if (!preg_match_all($pattern, strtolower($userAgent), $matches)) {
             // Microsoft Internet-Explorer 11 does not have a sign of "MSIE" or so in the useragent.
@@ -177,7 +177,7 @@ class ClientUtility
      */
     public static function getVersion($version)
     {
-        return doubleval(preg_replace('/^[^0-9]*/', '', $version));
+        return floatval(preg_replace('/^[^0-9]*/', '', $version));
     }
 
     /**
index 1650c66..840b89d 100644 (file)
@@ -435,7 +435,7 @@ class ExtensionManagementUtility
                 }
                 if (
                     isset($fieldArrayWithOptions[$fieldNumber + 1])
-                    && StringUtility::beginsWith($fieldArrayWithOptions[$fieldNumber + 1],  '--palette--')
+                    && StringUtility::beginsWith($fieldArrayWithOptions[$fieldNumber + 1], '--palette--')
                 ) {
                     // Match for $field and next field is a palette - add fields to this one
                     $paletteName = GeneralUtility::trimExplode(';', $fieldArrayWithOptions[$fieldNumber + 1]);
@@ -862,7 +862,7 @@ class ExtensionManagementUtility
         $moduleConfiguration['name'] = $moduleSignature;
         $moduleConfiguration['script'] = 'extjspaneldummy.html';
         $moduleConfiguration['extensionName'] = $extensionName;
-        $moduleConfiguration['configureModuleFunction'] = [ExtensionManagementUtility::class, 'configureModule'];
+        $moduleConfiguration['configureModuleFunction'] = [self::class, 'configureModule'];
         $GLOBALS['TBE_MODULES']['_configuration'][$moduleSignature] = $moduleConfiguration;
         self::addModule($mainModuleName, $subModuleName, $position);
     }
@@ -1007,7 +1007,7 @@ class ExtensionManagementUtility
         GeneralUtility::logDeprecatedFunction();
         if (StringUtility::beginsWith($path, 'EXT:')) {
             list($extensionKey, $relativePath) = explode('/', substr($path, 4), 2);
-            $path = ExtensionManagementUtility::extPath($extensionKey) . $relativePath;
+            $path = self::extPath($extensionKey) . $relativePath;
         }
         $GLOBALS['TBE_MODULES']['_PATHS'][$name] = $path;
     }
@@ -1501,7 +1501,7 @@ tt_content.' . $key . $suffix . ' {
             throw new \InvalidArgumentException('No TCA definition for table "pages".', 1447789492);
         }
 
-        $value = str_replace(',',  '', 'EXT:' . $extKey . '/' . $filePath);
+        $value = str_replace(',', '', 'EXT:' . $extKey . '/' . $filePath);
         $itemArray = [trim($title . ' (' . $extKey . ')'), $value];
         $GLOBALS['TCA']['pages']['columns']['tsconfig_includes']['config']['items'][] = $itemArray;
     }
@@ -1944,7 +1944,7 @@ tt_content.' . $key . $suffix . ' {
                 // Add ext_tables.php content of extension
                 $phpCodeToCache[] = trim(GeneralUtility::getUrl($extensionDetails['ext_tables.php']));
                 $phpCodeToCache[] = '';
-                $phpCodeToCache[] = ExtensionManagementUtility::class . '::loadNewTcaColumnsConfigFiles();';
+                $phpCodeToCache[] = self::class . '::loadNewTcaColumnsConfigFiles();';
                 $phpCodeToCache[] = '';
             }
         }
index dc65f33..fcc1ad0 100644 (file)
@@ -472,7 +472,7 @@ class ExtendedFileUtility extends BasicFileUtility
                         $shortcutRecord = BackendUtility::getRecord($row['tablename'], $row['recuid']);
 
                         if ($shortcutRecord) {
-                            $shortcutContent[] = '[record:' . $row['tablename'] . ':' .  $row['recuid'] . ']';
+                            $shortcutContent[] = '[record:' . $row['tablename'] . ':' . $row['recuid'] . ']';
                         } else {
                             $brokenReferences[] = $fileReferenceRow['ref_uid'];
                         }
index c1c8275..1cca06b 100644 (file)
@@ -2594,7 +2594,7 @@ class GeneralUtility
                 $msg .= implode(CRLF, $requestHeaders) . CRLF;
             }
             $msg .= CRLF;
-            fputs($fp, $msg);
+            fwrite($fp, $msg);
             while (!feof($fp)) {
                 $line = fgets($fp, 2048);
                 if (isset($report)) {
@@ -2977,7 +2977,7 @@ class GeneralUtility
             $temporaryDirectory = rtrim($directory, '/') . '.' . StringUtility::getUniqueId('remove') . '/';
             if (rename($directory, $temporaryDirectory)) {
                 if ($flushOpcodeCache) {
-                    GeneralUtility::makeInstance(OpcodeCacheService::class)->clearAllActive($directory);
+                    self::makeInstance(OpcodeCacheService::class)->clearAllActive($directory);
                 }
                 if ($keepOriginalDirectory) {
                     static::mkdir($directory);
@@ -3222,7 +3222,7 @@ class GeneralUtility
      */
     public static function getBytesFromSizeMeasurement($measurement)
     {
-        $bytes = doubleval($measurement);
+        $bytes = floatval($measurement);
         if (stripos($measurement, 'G')) {
             $bytes *= 1024 * 1024 * 1024;
         } elseif (stripos($measurement, 'M')) {
@@ -3742,7 +3742,7 @@ class GeneralUtility
      */
     protected static function isInternalRequestType()
     {
-        return (!defined('TYPO3_REQUESTTYPE') || (defined('TYPO3_REQUESTTYPE') && TYPO3_REQUESTTYPE & (TYPO3_REQUESTTYPE_INSTALL | TYPO3_REQUESTTYPE_CLI)));
+        return !defined('TYPO3_REQUESTTYPE') || (defined('TYPO3_REQUESTTYPE') && TYPO3_REQUESTTYPE & (TYPO3_REQUESTTYPE_INSTALL | TYPO3_REQUESTTYPE_CLI));
     }
 
     /**
@@ -3783,29 +3783,29 @@ class GeneralUtility
             // Browser version
             switch ($bInfo['BROWSER']) {
                 case 'net':
-                    $bInfo['VERSION'] = doubleval(substr($useragent, 8));
+                    $bInfo['VERSION'] = floatval(substr($useragent, 8));
                     if (strpos($useragent, 'Netscape6/') !== false) {
-                        $bInfo['VERSION'] = doubleval(substr(strstr($useragent, 'Netscape6/'), 10));
+                        $bInfo['VERSION'] = floatval(substr(strstr($useragent, 'Netscape6/'), 10));
                     }
                     // Will we ever know if this was a typo or intention...?! :-(
                     if (strpos($useragent, 'Netscape/6') !== false) {
-                        $bInfo['VERSION'] = doubleval(substr(strstr($useragent, 'Netscape/6'), 10));
+                        $bInfo['VERSION'] = floatval(substr(strstr($useragent, 'Netscape/6'), 10));
                     }
                     if (strpos($useragent, 'Netscape/7') !== false) {
-                        $bInfo['VERSION'] = doubleval(substr(strstr($useragent, 'Netscape/7'), 9));
+                        $bInfo['VERSION'] = floatval(substr(strstr($useragent, 'Netscape/7'), 9));
                     }
                     break;
                 case 'msie':
                     $tmp = strstr($useragent, 'MSIE');
-                    $bInfo['VERSION'] = doubleval(preg_replace('/^[^0-9]*/', '', substr($tmp, 4)));
+                    $bInfo['VERSION'] = floatval(preg_replace('/^[^0-9]*/', '', substr($tmp, 4)));
                     break;
                 case 'opera':
                     $tmp = strstr($useragent, 'Opera');
-                    $bInfo['VERSION'] = doubleval(preg_replace('/^[^0-9]*/', '', substr($tmp, 5)));
+                    $bInfo['VERSION'] = floatval(preg_replace('/^[^0-9]*/', '', substr($tmp, 5)));
                     break;
                 case 'konqu':
                     $tmp = strstr($useragent, 'Konqueror/');
-                    $bInfo['VERSION'] = doubleval(substr($tmp, 10));
+                    $bInfo['VERSION'] = floatval(substr($tmp, 10));
                     break;
             }
             // Client system
index eb622c0..4932dc1 100644 (file)
@@ -123,11 +123,11 @@ class MathUtility
         $number = 0;
         $Msign = '+';
         $err = '';
-        $buffer = doubleval(current($reg[2]));
+        $buffer = floatval(current($reg[2]));
         // Advance pointer
         $regSliced = array_slice($reg[2], 1, null, true);
         foreach ($regSliced as $k => $v) {
-            $v = doubleval($v);
+            $v = floatval($v);
             $sign = $reg[1][$k];
             if ($sign == '+' || $sign == '-') {
                 $Msign == '-' ? ($number -= $buffer) : ($number += $buffer);
index 98ba580..2ee1b1e 100644 (file)
@@ -28,7 +28,7 @@ class MonitorUtility
     {
         $peakUsage = memory_get_peak_usage(true);
         $memoryLimit = GeneralUtility::getBytesFromSizeMeasurement(ini_get('memory_limit'));
-        if (is_double($memoryLimit) && $memoryLimit != 0) {
+        if (is_float($memoryLimit) && $memoryLimit != 0) {
             if ($peakUsage / $memoryLimit >= 0.9) {
                 /** @var $registry \TYPO3\CMS\Core\Registry */
                 $registry = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Registry::class);
index 520f2ef..5004f24 100644 (file)
@@ -23,7 +23,7 @@ return [
         'thumbnails' => true,                            // Boolean: Enables the use of thumbnails in the backend interface.
         'thumbnails_png' => 0,                            // Bits. Bit0: If set, thumbnails from non-jpegs will be 'png', otherwise 'gif' (0=gif/1=png). Bit1: Even JPG's will be converted to png or gif (2=gif/3=png)
         'gif_compress' => true,                            // Boolean: Enables the use of the \TYPO3\CMS\Core\Utility\GeneralUtility::gifCompress() workaround function for compressing giffiles made with GD or IM, which probably use only RLE or no compression at all.
-        'imagefile_ext' => 'gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg',// Commalist of file extensions perceived as images by TYPO3. List should be set to 'gif,png,jpeg,jpg' if IM is not available. Lowercase and no spaces between!
+        'imagefile_ext' => 'gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai,svg', // Commalist of file extensions perceived as images by TYPO3. List should be set to 'gif,png,jpeg,jpg' if IM is not available. Lowercase and no spaces between!
         'gdlib' => true,                                // Boolean: Enables the use of GD.
         'gdlib_png' => false,                            // Boolean: Enables the use of GD, with PNG only. This means that all items normally generated as gif-files will be png-files instead!
         'im' => true,                                    // Boolean: Enables the use of IM.
@@ -230,7 +230,7 @@ return [
         'errorHandlerErrors' => E_ALL & ~(E_STRICT | E_NOTICE | E_COMPILE_WARNING | E_COMPILE_ERROR | E_CORE_WARNING | E_CORE_ERROR | E_PARSE | E_ERROR),        // Integer: The E_* constant that will be handled by the [SYS][errorHandler]. Not all PHP error types can be handled! Default is 30466 = <code>E_ALL & ~(E_STRICT | E_NOTICE | E_COMPILE_WARNING | E_COMPILE_ERROR | E_CORE_WARNING | E_CORE_ERROR | E_PARSE | E_ERROR)</code> (see <a href="http://php.net/manual/en/errorfunc.constants.php" target="_blank">PHP documentation</a>).
         'exceptionalErrors' => E_ALL & ~(E_STRICT | E_NOTICE | E_COMPILE_WARNING | E_COMPILE_ERROR | E_CORE_WARNING | E_CORE_ERROR | E_PARSE | E_ERROR | E_DEPRECATED | E_WARNING | E_USER_ERROR | E_USER_NOTICE | E_USER_WARNING),        // Integer: The E_* constant that will be converted into an exception by the default [SYS][errorHandler]. Default is 20480 = <code>E_ALL & ~(E_STRICT | E_NOTICE | E_COMPILE_WARNING | E_COMPILE_ERROR | E_CORE_WARNING | E_CORE_ERROR | E_PARSE | E_ERROR | E_DEPRECATED | E_WARNING | E_USER_ERROR | E_USER_NOTICE | E_USER_WARNING)</code> (see <a href="http://php.net/manual/en/errorfunc.constants.php" target="_blank">PHP documentation</a>).
         'enable_errorDLOG' => 0,    // Boolean: If set, errors are written to the developer log (requires an installed *devlog* extension).
-        'enable_exceptionDLOG' => 0,// Boolean: If set, exceptions are written to the developer log (requires an installed *devlog* extension).
+        'enable_exceptionDLOG' => 0, // Boolean: If set, exceptions are written to the developer log (requires an installed *devlog* extension).
         'syslogErrorReporting' => E_ALL & ~(E_STRICT | E_NOTICE),        // Integer: Configures which PHP errors should be logged to the configured syslogs (see: [SYS][systemLog]). If set to "0" no PHP errors are logged to the syslog. Default is 30711 = <code>E_ALL & ~(E_STRICT | E_NOTICE)</code> (see <a href="http://php.net/manual/en/errorfunc.constants.php" target="_blank">PHP documentation</a>).
         'belogErrorReporting' => E_ALL & ~(E_STRICT | E_NOTICE),        // Integer: Configures which PHP errors should be logged to the "syslog" table (extension: belog). If set to "0" no PHP errors are logged to the sys_log table. Default is 30711 = <code>E_ALL & ~(E_STRICT | E_NOTICE)</code> (see <a href="http://php.net/manual/en/errorfunc.constants.php" target="_blank">PHP documentation</a>).
         'locallangXMLOverride' => [],        // For extension/overriding of the arrays in 'locallang' files in frontend and backend. See 'Inside TYPO3' for more information.
index c3b0488..8d87ee2 100644 (file)
@@ -74,7 +74,7 @@ class RemoveXSS
             'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onoffline', 'ononline', 'onpagehide', 'onpageshow', 'onpaste',
             'onpause', 'onplay', 'onplaying', 'onpopstate', 'onprogress', 'onpropertychange', 'onratechange', 'onreadystatechange',
             'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted',
-            'onscroll', 'onseeked', 'onseeking','onselect', 'onselectionchange', 'onselectstart', 'onshow', 'onstalled', 'onstart',
+            'onscroll', 'onseeked', 'onseeking', 'onselect', 'onselectionchange', 'onselectstart', 'onshow', 'onstalled', 'onstart',
             'onstop', 'onstorage', 'onsubmit', 'onsuspend', 'ontimeupdate', 'onunload', 'onvolumechange', 'onwaiting'];
         $tagKeywords = ['applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame',
             'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base', 'video', 'audio', 'track', 'canvas'];
@@ -90,7 +90,7 @@ class RemoveXSS
             'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onoffline', 'ononline',
             'onpagehide', 'onpageshow', 'onpaste', 'onpause', 'onplay', 'onplaying', 'onpopstate', 'onprogress',
             'onpropertychange', 'onratechange', 'onreadystatechange', 'onredo', 'onreset', 'onresize', 'onresizeend',
-            'onresizestart','onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onseeked', 'onseeking',
+            'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onseeked', 'onseeking',
             'onselect', 'onselectionchange', 'onselectstart', 'onshow', 'onstalled', 'onstart', 'onstop', 'onstorage', 'onsubmit',
             'onsuspend', 'ontimeupdate', 'onundo', 'onunload', 'onvolumechange', 'onwaiting'];
         $protocolKeywords = ['javascript', 'vbscript', 'expression'];
index 21318c1..aa8946d 100644 (file)
@@ -16,7 +16,6 @@ namespace TYPO3\CMS\Core\Tests\Functional\Cache\Backend;
 
 use TYPO3\CMS\Core\Cache\Backend\Typo3DatabaseBackend;
 use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
-use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Tests\FunctionalTestCase;
 
 /**
@@ -178,8 +177,6 @@ class Typo3DatabaseBackendTest extends FunctionalTestCase
             ]
         );
 
-
-
         // Have backend with compression enabled
         $subject = new Typo3DatabaseBackend('Testing', ['compression' => true]);
         $subject->setCache($frontendProphecy->reveal());
index 2d5edd2..370cfa9 100644 (file)
@@ -154,7 +154,7 @@ class Collector implements \TYPO3\CMS\Core\SingletonInterface
             unset($fieldList);
         }
 
-        return (!empty($this->tableFields[$tableName]) ? $this->tableFields[$tableName] : []);
+        return !empty($this->tableFields[$tableName]) ? $this->tableFields[$tableName] : [];
     }
 
     /**
index e0ec38e..cd27d42 100644 (file)
@@ -286,19 +286,19 @@ class DataHandlerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function inputValueCheckCallsGetDateTimeFormatsForDatetimeFieldsWithNonEmptyValue($dbType)
     {
         $dateTimeFormats = [
-            'date' => array(
+            'date' => [
                 'empty' => '0000-00-00',
                 'format' => 'Y-m-d'
-            ),
-            'datetime' => array(
+            ],
+            'datetime' => [
                 'empty' => '0000-00-00 00:00:00',
                 'format' => 'Y-m-d H:i:s'
-            )
+            ]
         ];
-        $tcaFieldConf = array(
-            'input' => array(),
+        $tcaFieldConf = [
+            'input' => [],
             'dbType' => $dbType
-        );
+        ];
         $this->mockDatabaseConnection->expects($this->once())->method('getDateTimeFormats')->willReturn($dateTimeFormats);
         $this->subject->_call('checkValueForInput', $dateTimeFormats[$dbType]['empty'], $tcaFieldConf, '', 0, 0, '');
     }
index ae60127..aa16e98 100644 (file)
@@ -426,7 +426,7 @@ class IconFactoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function getIconForResourceWithOpenFolderReturnsOpenFolderIcon()
     {
         $folderObject = $this->getTestSubjectFolderObject('/test');
-        $result = $this->subject->getIconForResource($folderObject, Icon::SIZE_DEFAULT, null,  ['folder-open' => true])->render();
+        $result = $this->subject->getIconForResource($folderObject, Icon::SIZE_DEFAULT, null, ['folder-open' => true])->render();
         $this->assertContains('<span class="t3js-icon icon icon-size-default icon-state-default icon-apps-filetree-folder-opened" data-identifier="apps-filetree-folder-opened">', $result);
     }
 
index 91bb456..6f92670 100644 (file)
@@ -39,6 +39,6 @@ class FileLockStrategyTest extends UnitTestCase
     public function constructorSetsFilePathToExpectedValue()
     {
         $lock = $this->getAccessibleMock(FileLockStrategy::class, ['dummy'], ['999999999']);
-        $this->assertSame(PATH_site . FileLockStrategy::FILE_LOCK_FOLDER  . 'flock_' . md5('999999999'), $lock->_get('filePath'));
+        $this->assertSame(PATH_site . FileLockStrategy::FILE_LOCK_FOLDER . 'flock_' . md5('999999999'), $lock->_get('filePath'));
     }
 }
index a71388d..e50827d 100644 (file)
@@ -39,7 +39,7 @@ class SimpleLockStrategyTest extends UnitTestCase
     public function constructorSetsResourceToPathWithIdIfUsingSimpleLocking()
     {
         $lock = $this->getAccessibleMock(SimpleLockStrategy::class, ['dummy'], ['999999999']);
-        $this->assertSame(PATH_site . SimpleLockStrategy::FILE_LOCK_FOLDER  . 'simple_' . md5('999999999'), $lock->_get('filePath'));
+        $this->assertSame(PATH_site . SimpleLockStrategy::FILE_LOCK_FOLDER . 'simple_' . md5('999999999'), $lock->_get('filePath'));
     }
 
     /**
index 5e420b9..c052dc5 100644 (file)
@@ -85,7 +85,7 @@ class DatabaseWriterTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $logRecordFixture->expects($this->any())->method('getData')->will($this->returnValue([]));
 
         /** @var \TYPO3\CMS\Core\Log\Writer\DatabaseWriter|\PHPUnit_Framework_MockObject_MockObject $subject */
-        #$subject = $this->getMock(\TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class, array('dummy'), array(), '', FALSE);
+        //$subject = $this->getMock(\TYPO3\CMS\Core\Log\Writer\DatabaseWriter::class, array('dummy'), array(), '', FALSE);
         $subject = new \TYPO3\CMS\Core\Log\Writer\DatabaseWriter();
 
         $GLOBALS['TYPO3_DB'] = $this->getMock(\TYPO3\CMS\Core\Database\DatabaseConnection::class, [], [], '', false);
index f9608bd..d09266a 100644 (file)
@@ -369,7 +369,7 @@ class ResourceCompressorTest extends BaseTestCase
             2 => [
                 $path . 'comment_hacks.css',
                 $path . 'comment_hacks.css.optimized.css'
-            ],/*
+            ], /*
             // File. Tests:
             // - Any @charset declaration at the beginning of a file should be
             //   removed without breaking subsequent CSS.*/
index 8d5bb3e..303e266 100644 (file)
@@ -30,7 +30,7 @@ class TreeDataProviderWithConfigurationFixture
         }
         $tcaConfiguration = [
             'treeConfig' => [
-                'dataProvider' => TreeDataProviderWithConfigurationFixture::class,
+                'dataProvider' => self::class,
             ],
             'internal_type' => 'foo',
         ];
index c11d5b1..fc6528e 100644 (file)
@@ -1486,8 +1486,8 @@ class ArrayUtilityTest extends UnitTestCase
                 []
             ],
             'returns self if array is already numerically keyed' => [
-                [1,2,3],
-                [1,2,3]
+                [1, 2, 3],
+                [1, 2, 3]
             ],
             'returns correctly if keys are numeric, but contains a leap' => [
                 [0 => 'One', 1 => 'Two', 3 => 'Three'],
@@ -1571,7 +1571,7 @@ class ArrayUtilityTest extends UnitTestCase
                         'three' => [
                             2 => 'SubSubOne',
                             5 => 'SubSubTwo',
-                            9 => [0,1,2],
+                            9 => [0, 1, 2],
                             []
                         ]
                     ]
@@ -1585,7 +1585,7 @@ class ArrayUtilityTest extends UnitTestCase
                         'three' => [
                             'SubSubOne',
                             'SubSubTwo',
-                            [0,1,2],
+                            [0, 1, 2],
                             []
                         ]
                     ]
index 4af9090..e6c9818 100644 (file)
@@ -1485,7 +1485,7 @@ class GeneralUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
                 'Hello all   together     all      there all       all   are  all    none',
                 true,
                 5,
-                ['Hello', 'together', 'there', 'are' ,'none']
+                ['Hello', 'together', 'there', 'are' , 'none']
             ],
             'can use words as delimiter and do not remove empty' => [
                 'all  there',
@@ -4522,7 +4522,9 @@ class GeneralUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function callUserFunctionCanCallFunction()
     {
         $inputData = ['foo' => 'bar'];
-        $result = GeneralUtility::callUserFunction(function () { return 'Worked fine'; }, $inputData, $this, '');
+        $result = GeneralUtility::callUserFunction(function () {
+            return 'Worked fine';
+        }, $inputData, $this, '');
         $this->assertEquals('Worked fine', $result);
     }
 
@@ -4532,7 +4534,7 @@ class GeneralUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     public function callUserFunctionCanCallMethod()
     {
         $inputData = ['foo' => 'bar'];
-        $result = GeneralUtility::callUserFunction(GeneralUtilityTest::class . '->user_calledUserFunction', $inputData, $this);
+        $result = GeneralUtility::callUserFunction(self::class . '->user_calledUserFunction', $inputData, $this);
         $this->assertEquals('Worked fine', $result);
     }
 
@@ -4562,7 +4564,7 @@ class GeneralUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $inputData = ['called' => []];
         GeneralUtility::callUserFunction('&TYPO3\\CMS\\Core\\Tests\\Unit\\Utility\\GeneralUtilityTest->user_calledUserFunctionCountCallers', $inputData, $this);
         GeneralUtility::callUserFunction('&TYPO3\\CMS\\Core\\Tests\\Unit\\Utility\\GeneralUtilityTest->user_calledUserFunctionCountCallers', $inputData, $this);
-        $this->assertEquals(1, sizeof($inputData['called']));
+        $this->assertEquals(1, count($inputData['called']));
     }
 
     /**
index b832f4e..b56ee8f 100644 (file)
@@ -55,7 +55,6 @@ class VersionNumberUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
             'object' => [new \stdClass()],
             'NULL' => [null],
             'function' => [function () {
-
             }]
         ];
     }
index 3b1e4ae..b225d98 100644 (file)
@@ -1949,7 +1949,7 @@ class DatabaseConnection extends \TYPO3\CMS\Core\Database\DatabaseConnection
      * @return string Output string; Wrapped in single quotes and quotes in the string (" / ') and \ will be backslashed (or otherwise based on DBAL handler)
      * @see quoteStr()
      */
-    public function fullQuoteStr($str, $table,  $allowNull = false)
+    public function fullQuoteStr($str, $table, $allowNull = false)
     {
         if ($allowNull && $str === null) {
             return 'NULL';
@@ -2311,7 +2311,7 @@ class DatabaseConnection extends \TYPO3\CMS\Core\Database\DatabaseConnection
                             }
                         } else {
                             foreach ($output as $key => $value) {
-                                if (is_integer($key)) {
+                                if (is_int($key)) {
                                     unset($output[$key]);
                                 }
                             }
@@ -2372,7 +2372,7 @@ class DatabaseConnection extends \TYPO3\CMS\Core\Database\DatabaseConnection
                         $keyIndex = 0;
                         foreach ($output as $key => $value) {
                             unset($output[$key]);
-                            if (is_integer($key) || $this->runningADOdbDriver('mssql')) {
+                            if (is_int($key) || $this->runningADOdbDriver('mssql')) {
                                 $output[$keyIndex] = $value;
                                 if ($value === ' ') {
                                     // MSSQL does not know such thing as an empty string. So it returns one space instead, which we must fix.
index 005fb5e..4d973c2 100644 (file)
@@ -71,7 +71,8 @@ class ExtensionManager
                     [
                         'documentTranslation' => $documentTranslation,
                     ],
-                    function () {},
+                    function () {
+                    },
                     new RenderingContext()
                 );
             }
index d6e7785..06f89f5 100644 (file)
@@ -238,6 +238,6 @@ class Bootstrap implements \TYPO3\CMS\Extbase\Core\BootstrapInterface
      */
     protected function isInCliMode()
     {
-        return (defined('TYPO3_cliMode') && TYPO3_cliMode);
+        return defined('TYPO3_cliMode') && TYPO3_cliMode;
     }
 }
index 15c5b06..8cf718a 100644 (file)
@@ -223,7 +223,7 @@ class Result
             return $this->recurseThroughResult(explode('.', $propertyPath));
         }
         if (!isset($this->propertyResults[$propertyPath])) {
-            $this->propertyResults[$propertyPath] = new Result();
+            $this->propertyResults[$propertyPath] = new self();
             $this->propertyResults[$propertyPath]->setParent($this);
         }
         return $this->propertyResults[$propertyPath];
@@ -244,7 +244,7 @@ class Result
         $propertyName = array_shift($pathSegments);
 
         if (!isset($this->propertyResults[$propertyName])) {
-            $this->propertyResults[$propertyName] = new Result();
+            $this->propertyResults[$propertyName] = new self();
             $this->propertyResults[$propertyName]->setParent($this);
         }
 
index b2c5dbb..1fa1906 100644 (file)
@@ -36,7 +36,7 @@ class Response extends \TYPO3\CMS\Extbase\Mvc\Response
      */
     public function setExitCode($exitCode)
     {
-        if (!is_integer($exitCode)) {
+        if (!is_int($exitCode)) {
             throw new \InvalidArgumentException(sprintf('Tried to set invalid exit code. The value must be integer, %s given.', gettype($exitCode)), 1312222064);
         }
         $this->exitCode = $exitCode;
index 1451720..cf944d1 100644 (file)
@@ -529,7 +529,7 @@ class DataMapper implements \TYPO3\CMS\Core\SingletonInterface
     protected function propertyMapsByForeignKey(DomainObjectInterface $parentObject, $propertyName)
     {
         $columnMap = $this->getDataMap(get_class($parentObject))->getColumnMap($propertyName);
-        return ($columnMap->getParentKeyFieldName() !== null);
+        return $columnMap->getParentKeyFieldName() !== null;
     }
 
     /**
index d1790d7..5f5e756 100644 (file)
@@ -295,7 +295,7 @@ class PersistenceManager implements \TYPO3\CMS\Extbase\Persistence\PersistenceMa
      */
     public function isNewObject($object)
     {
-        return ($this->persistenceSession->hasObject($object) === false);
+        return $this->persistenceSession->hasObject($object) === false;
     }
 
     /**
index dbaa9fb..dc29316 100644 (file)
@@ -349,9 +349,9 @@ class ObjectStorage implements \Countable, \Iterator, \ArrayAccess, ObjectMonito
      */
     public function isRelationDirty($object)
     {
-        return (isset($this->addedObjectsPositions[spl_object_hash($object)])
+        return isset($this->addedObjectsPositions[spl_object_hash($object)])
                 && isset($this->removedObjectsPositions[spl_object_hash($object)])
-                && ($this->addedObjectsPositions[spl_object_hash($object)] !== $this->removedObjectsPositions[spl_object_hash($object)]));
+                && ($this->addedObjectsPositions[spl_object_hash($object)] !== $this->removedObjectsPositions[spl_object_hash($object)]);
     }
 
     /**
index 1e921c1..d3b225a 100644 (file)
@@ -361,7 +361,7 @@ class PropertyMapper implements \TYPO3\CMS\Core\SingletonInterface
             return 'array';
         } elseif (is_float($source)) {
             return 'float';
-        } elseif (is_integer($source)) {
+        } elseif (is_int($source)) {
             return 'integer';
         } elseif (is_bool($source)) {
             return 'boolean';
index 3ce0c22..e845ea6 100644 (file)
@@ -245,7 +245,7 @@ class PropertyMappingConfiguration implements PropertyMappingConfigurationInterf
             return $this->subConfigurationForProperty[self::PROPERTY_PATH_PLACEHOLDER];
         }
 
-        return new PropertyMappingConfiguration();
+        return new self();
     }
 
     /**
index 36cdde2..bd8b4ae 100644 (file)
@@ -105,7 +105,7 @@ class DateTimeConverter extends \TYPO3\CMS\Extbase\Property\TypeConverter\Abstra
         if (is_array($source)) {
             return true;
         }
-        if (is_integer($source)) {
+        if (is_int($source)) {
             return true;
         }
         return is_string($source);
@@ -126,12 +126,12 @@ class DateTimeConverter extends \TYPO3\CMS\Extbase\Property\TypeConverter\Abstra
         $dateFormat = $this->getDefaultDateFormat($configuration);
         if (is_string($source)) {
             $dateAsString = $source;
-        } elseif (is_integer($source)) {
+        } elseif (is_int($source)) {
             $dateAsString = strval($source);
         } else {
             if (isset($source['date']) && is_string($source['date'])) {
                 $dateAsString = $source['date'];
-            } elseif (isset($source['date']) && is_integer($source['date'])) {
+            } elseif (isset($source['date']) && is_int($source['date'])) {
                 $dateAsString = strval($source['date']);
             } elseif ($this->isDatePartKeysProvided($source)) {
                 if ($source['day'] < 1 || $source['month'] < 1 || $source['year'] < 1) {
index 0c3d306..8adc6eb 100644 (file)
@@ -118,7 +118,7 @@ class ClassReflection extends \ReflectionClass
         $extendedInterfaces = [];
         $interfaces = parent::getInterfaces();
         foreach ($interfaces as $interface) {
-            $extendedInterfaces[] = new ClassReflection($interface->getName());
+            $extendedInterfaces[] = new self($interface->getName());
         }
         return $extendedInterfaces;
     }
@@ -133,7 +133,7 @@ class ClassReflection extends \ReflectionClass
     public function getParentClass()
     {
         $parentClass = parent::getParentClass();
-        return $parentClass === false ? false : new ClassReflection($parentClass->getName());
+        return $parentClass === false ? false : new self($parentClass->getName());
     }
 
     /**
index 6cdee69..b82f599 100644 (file)
@@ -325,7 +325,7 @@ class ArrayUtility
     {
         $containsNumericalKeysOnly = true;
         array_walk($array, function ($value, $key) use (&$containsNumericalKeysOnly) {
-            if (!is_integer($key)) {
+            if (!is_int($key)) {
                 $containsNumericalKeysOnly = false;
                 return;
             }
index a6632a5..31a41fd 100644 (file)
@@ -103,7 +103,9 @@ class OperatorTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase
         );
 
         $result = array_map(
-            function ($row) { return $row['uid']; },
+            function ($row) {
+                return $row['uid'];
+            },
             $query->execute(true)
         );
         $this->assertEquals([3, 4, 5], $result);
index c6d9ea4..718f0ce 100644 (file)
@@ -408,7 +408,9 @@ class AbstractConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
         $this->abstractConfigurationManager->setConfiguration($configuration);
         $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testPluginConfiguration));
         $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testSwitchableControllerActions));
-        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallBack(function ($a) { return $a; }));
+        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallBack(function ($a) {
+            return $a;
+        }));
         $mergedConfiguration = $this->abstractConfigurationManager->getConfiguration();
         $expectedResult = [
             'Controller1' => [
@@ -435,7 +437,9 @@ class AbstractConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
         $this->abstractConfigurationManager->setConfiguration($configuration);
         $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testPluginConfiguration));
         $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testSwitchableControllerActions));
-        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallBack(function ($a) { return $a; }));
+        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallBack(function ($a) {
+            return $a;
+        }));
         $mergedConfiguration = $this->abstractConfigurationManager->getConfiguration();
         $expectedResult = [
             'Controller1' => [
@@ -462,7 +466,9 @@ class AbstractConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
         $this->abstractConfigurationManager->setConfiguration($configuration);
         $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testPluginConfiguration));
         $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testSwitchableControllerActions));
-        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallBack(function ($a) { return $a; }));
+        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallBack(function ($a) {
+            return $a;
+        }));
         $mergedConfiguration = $this->abstractConfigurationManager->getConfiguration();
         $expectedResult = [];
         $actualResult = $mergedConfiguration['controllerConfiguration'];
@@ -486,7 +492,9 @@ class AbstractConfigurationManagerTest extends \TYPO3\CMS\Core\Tests\UnitTestCas
         $this->abstractConfigurationManager->setConfiguration($configuration);
         $this->abstractConfigurationManager->expects($this->once())->method('getPluginConfiguration')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testPluginConfiguration));
         $this->abstractConfigurationManager->expects($this->once())->method('getSwitchableControllerActions')->with('CurrentExtensionName', 'CurrentPluginName')->will($this->returnValue($this->testSwitchableControllerActions));
-        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallBack(function ($a) { return $a; }));
+        $this->abstractConfigurationManager->expects($this->once())->method('getContextSpecificFrameworkConfiguration')->will($this->returnCallBack(function ($a) {
+            return $a;
+        }));
         $mergedConfiguration = $this->abstractConfigurationManager->getConfiguration();
         $expectedResult = [
             'Controller1' => [
index 5e10137..34c5246 100644 (file)
@@ -110,7 +110,7 @@ class Typo3DbBackendTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
     {
         return [
             'string' => ['bar', '123', '123'],
-            'array' => ['bar', [1,2,3], '1,2,3'],
+            'array' => ['bar', [1, 2, 3], '1,2,3'],
         ];
     }
 
index 27be186..863b374 100644 (file)
@@ -27,7 +27,7 @@ class DateTimeSubFixture extends \DateTime
      */
     public static function createFromFormat($format, $time, $timezone = null)
     {
-        return new DateTimeSubFixture();
+        return new self();
     }
 
     /**
index 13fe5bf..66bd166 100644 (file)
@@ -74,14 +74,14 @@ class PersistentObjectConverterTest extends UnitTestCase
         $this->mockObjectManager->expects($this->any())
             ->method('get')
             ->will($this->returnCallback(function () {
-                    $args = func_get_args();
-                    $reflectionClass = new \ReflectionClass(array_shift($args));
-                    if (empty($args)) {
-                        return $reflectionClass->newInstance();
-                    } else {
-                        return $reflectionClass->newInstanceArgs($args);
-                    }
-                }));
+                $args = func_get_args();
+                $reflectionClass = new \ReflectionClass(array_shift($args));
+                if (empty($args)) {
+                    return $reflectionClass->newInstance();
+                } else {
+                    return $reflectionClass->newInstanceArgs($args);
+                }
+            }));
         $this->inject($this->converter, 'objectManager', $this->mockObjectManager);
 
         $this->mockContainer = $this->getMock(\TYPO3\CMS\Extbase\Object\Container\Container::class);
index 49772ed..c6f15cf 100644 (file)
@@ -119,7 +119,8 @@ class DispatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
             ->method('slot')
             ->will($this->returnCallback(
                         function ($foo, $baz) {
-                            return ['modified_' . $foo, 'modified_' . $baz];}
+                            return ['modified_' . $foo, 'modified_' . $baz];
+                        }
                     ));
 
         $secondMockSlot = $this->getMock(\TYPO3\CMS\Extbase\Tests\Fixture\SlotFixture::class);
@@ -145,7 +146,8 @@ class DispatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
             ->method('slot')
             ->will($this->returnCallback(
                         function ($foo, $baz) {
-                            return ['modified_' . $foo, 'modified_' . $baz];}
+                            return ['modified_' . $foo, 'modified_' . $baz];
+                        }
                     ));
 
         $secondMockSlot = $this->getMock(\TYPO3\CMS\Extbase\Tests\Fixture\SlotFixture::class);
@@ -171,7 +173,8 @@ class DispatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
             ->method('slot')
             ->will($this->returnCallback(
                         function ($foo, $baz) {
-                            return ['modified_' . $foo, 'modified_' . $baz];}
+                            return ['modified_' . $foo, 'modified_' . $baz];
+                        }
                     ));
 
         $secondMockSlot = $this->getMock(\TYPO3\CMS\Extbase\Tests\Fixture\SlotFixture::class);
@@ -203,7 +206,8 @@ class DispatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
             ->method('slot')
             ->will($this->returnCallback(
                         function () {
-                            return 'string';}
+                            return 'string';
+                        }
                     ));
 
         $this->signalSlotDispatcher->connect('Foo', 'emitBar', $mockSlot, 'slot', false);
@@ -223,7 +227,8 @@ class DispatcherTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
             ->method('slot')
             ->will($this->returnCallback(
                         function () {
-                            return [1, 2, 3];}
+                            return [1, 2, 3];
+                        }
                     ));
 
         $this->signalSlotDispatcher->connect('Foo', 'emitBar', $mockSlot, 'slot', false);
index bc4e029..7606e2b 100644 (file)
@@ -39,7 +39,7 @@ class Extension extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
         6 => 'templates',
         8 => 'doc',
         9 => 'example',
-        Extension::DISTRIBUTION_CATEGORY => 'distribution'
+        self::DISTRIBUTION_CATEGORY => 'distribution'
     ];
 
     /**
index 184456c..907b499 100644 (file)
@@ -513,11 +513,10 @@ class FileHandlingUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $fileHandlerMock->expects($this->exactly(2))
             ->method('createNestedDirectory')
             ->will($this->returnCallback(function ($path) {
-                    if (!in_array($path, ['foo/bar', 'baz/foo'])) {
-                        throw new \Exception('Path "' . $path . '" is not expected to be created');
-                    }
-
-                })
+                if (!in_array($path, ['foo/bar', 'baz/foo'])) {
+                    throw new \Exception('Path "' . $path . '" is not expected to be created');
+                }
+            })
             );
         $fileHandlerMock->ensureConfiguredDirectoriesExist([
                 'key' => 'foo_bar',
index e6a6904..39cedee 100644 (file)
@@ -227,15 +227,15 @@ class BooleanNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
         switch ($comparator) {
             case '==':
                 if (is_object($evaluatedLeftSide) || is_object($evaluatedRightSide)) {
-                    return ($evaluatedLeftSide === $evaluatedRightSide);
+                    return $evaluatedLeftSide === $evaluatedRightSide;
                 } else {
-                    return ($evaluatedLeftSide == $evaluatedRightSide);
+                    return $evaluatedLeftSide == $evaluatedRightSide;
                 }
             case '!=':
                 if (is_object($evaluatedLeftSide) || is_object($evaluatedRightSide)) {
-                    return ($evaluatedLeftSide !== $evaluatedRightSide);
+                    return $evaluatedLeftSide !== $evaluatedRightSide;
                 } else {
-                    return ($evaluatedLeftSide != $evaluatedRightSide);
+                    return $evaluatedLeftSide != $evaluatedRightSide;
                 }
             case '%':
                 if (!self::isComparable($evaluatedLeftSide, $evaluatedRightSide)) {
@@ -329,16 +329,16 @@ class BooleanNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
             return $value;
         }
 
-        if (is_integer($value) || is_float($value)) {
+        if (is_int($value) || is_float($value)) {
             return !empty($value);
         }
 
         if (is_numeric($value)) {
-            return ($value != 0);
+            return $value != 0;
         }
 
         if (is_string($value)) {
-            return (!empty($value) && strtolower($value) !== 'false');
+            return !empty($value) && strtolower($value) !== 'false';
         }
         if (is_array($value) || (is_object($value) && $value instanceof \Countable)) {
             return (bool)count($value);
index c62b872..cb99161 100644 (file)
@@ -253,6 +253,6 @@ abstract class AbstractConditionViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHel
      */
     protected static function evaluateCondition($arguments = null)
     {
-        return (isset($arguments['condition']) && $arguments['condition']);
+        return isset($arguments['condition']) && $arguments['condition'];
     }
 }
index 872475c..3f8b1b8 100644 (file)
@@ -40,12 +40,12 @@ abstract class AbstractBackendViewHelper extends AbstractViewHelper
      */
     public function getDocInstance()
     {
-        if ($this->viewHelperVariableContainer->exists(AbstractBackendViewHelper::class, 'DocumentTemplate')) {
-            $doc = $this->viewHelperVariableContainer->get(AbstractBackendViewHelper::class, 'DocumentTemplate');
+        if ($this->viewHelperVariableContainer->exists(self::class, 'DocumentTemplate')) {
+            $doc = $this->viewHelperVariableContainer->get(self::class, 'DocumentTemplate');
         } else {
             /** @var $doc DocumentTemplate */
             $doc = GeneralUtility::makeInstance(DocumentTemplate::class);
-            $this->viewHelperVariableContainer->add(AbstractBackendViewHelper::class, 'DocumentTemplate', $doc);
+            $this->viewHelperVariableContainer->add(self::class, 'DocumentTemplate', $doc);
         }
 
         return $doc;
@@ -59,12 +59,12 @@ abstract class AbstractBackendViewHelper extends AbstractViewHelper
      */
     public function getPageRenderer()
     {
-        if ($this->viewHelperVariableContainer->exists(AbstractBackendViewHelper::class, 'PageRenderer')) {
-            $pageRenderer = $this->viewHelperVariableContainer->get(AbstractBackendViewHelper::class, 'PageRenderer');
+        if ($this->viewHelperVariableContainer->exists(self::class, 'PageRenderer')) {
+            $pageRenderer = $this->viewHelperVariableContainer->get(self::class, 'PageRenderer');
         } else {
             /** @var $doc DocumentTemplate */
             $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
-            $this->viewHelperVariableContainer->add(AbstractBackendViewHelper::class, 'PageRenderer', $pageRenderer);
+            $this->viewHelperVariableContainer->add(self::class, 'PageRenderer', $pageRenderer);
         }
 
         return $pageRenderer;
index c6e2404..2d23b0f 100644 (file)
@@ -61,6 +61,6 @@ class IfAuthenticatedViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abstrac
      */
     protected static function evaluateCondition($arguments = null)
     {
-        return (isset($GLOBALS['BE_USER']) && $GLOBALS['BE_USER']->user['uid'] > 0);
+        return isset($GLOBALS['BE_USER']) && $GLOBALS['BE_USER']->user['uid'] > 0;
     }
 }
index 21e80ea..3209328 100644 (file)
@@ -89,7 +89,7 @@ class BytesViewHelper extends AbstractViewHelper implements CompilableInterface
         if (empty(self::$units)) {
             self::$units = GeneralUtility::trimExplode(',', LocalizationUtility::translate('viewhelper.format.bytes.units', 'fluid'));
         }
-        if (!is_integer($value) && !is_float($value)) {
+        if (!is_int($value) && !is_float($value)) {
             if (is_numeric($value)) {
                 $value = (float)$value;
             } else {
index 9f4640d..35c3d2a 100644 (file)
@@ -105,19 +105,19 @@ class SwitchViewHelper extends AbstractViewHelper implements ChildNodeAccessInte
             'break' => false
         ];
 
-        if ($viewHelperVariableContainer->exists(SwitchViewHelper::class, 'stateStack')) {
-            $stateStack = $viewHelperVariableContainer->get(SwitchViewHelper::class, 'stateStack');
+        if ($viewHelperVariableContainer->exists(self::class, 'stateStack')) {
+            $stateStack = $viewHelperVariableContainer->get(self::class, 'stateStack');
         } else {
             $stateStack = [];
         }
         $stateStack[] = $stackValue;
-        $viewHelperVariableContainer->addOrUpdate(SwitchViewHelper::class, 'stateStack', $stateStack);
+        $viewHelperVariableContainer->addOrUpdate(self::class, 'stateStack', $stateStack);
 
         $result = $renderChildrenClosure();
 
-        $stateStack = $viewHelperVariableContainer->get(SwitchViewHelper::class, 'stateStack');
+        $stateStack = $viewHelperVariableContainer->get(self::class, 'stateStack');
         array_pop($stateStack);
-        $viewHelperVariableContainer->addOrUpdate(SwitchViewHelper::class, 'stateStack', $stateStack);
+        $viewHelperVariableContainer->addOrUpdate(self::class, 'stateStack', $stateStack);
 
         return $result;
     }
index 4929363..9bd35c2 100644 (file)
@@ -28,7 +28,8 @@ use TYPO3\CMS\Fluid\Core\ViewHelper\Exception;
  * the normal render children closure, if that named
  * argument is specified and not empty.
  */
-trait CompileWithContentArgumentAndRenderStatic {
+trait CompileWithContentArgumentAndRenderStatic
+{
 
     /**
      * Name of variable that contains the value to use
@@ -64,11 +65,14 @@ trait CompileWithContentArgumentAndRenderStatic {
      * @return string Rendered string
      * @api
      */
-    public function render() {
+    public function render()
+    {
         $argumentName = $this->resolveContentArgumentName();
         $arguments = $this->arguments;
         if (!empty($argumentName) && isset($arguments[$argumentName])) {
-            $renderChildrenClosure = function() use ($arguments, $argumentName) { return $arguments[$argumentName]; };
+            $renderChildrenClosure = function () use ($arguments, $argumentName) {
+                return $arguments[$argumentName];
+            };
         } else {
             $renderChildrenClosure = $this->buildRenderChildrenClosure();
         }
@@ -112,7 +116,8 @@ trait CompileWithContentArgumentAndRenderStatic {
      * @return string
      * @throws Exception
      */
-    protected function resolveContentArgumentName() {
+    protected function resolveContentArgumentName()
+    {
         if (empty($this->contentArgumentName)) {
             foreach ($this->prepareArguments() as $registeredArgument) {
                 if (!$registeredArgument->isRequired()) {
index 7877a14..6c2797c 100644 (file)
@@ -30,7 +30,7 @@ trait CompileWithRenderStatic
     /**
      * @return \Closure
      */
-    abstract function buildRenderChildrenClosure();
+    abstract public function buildRenderChildrenClosure();
 
     /**
      * Default render method - simply calls renderStatic() with a
@@ -39,7 +39,8 @@ trait CompileWithRenderStatic
      * @return string Rendered string
      * @api
      */
-    public function render() {
+    public function render()
+    {
         return static::renderStatic(
             $this->arguments,
             $this->buildRenderChildrenClosure(),
index bca23d6..a88f332 100644 (file)
@@ -200,7 +200,7 @@ class TemplateParserPatternTest extends \TYPO3\CMS\Core\Tests\UnitTestCase
         $this->assertEquals(preg_split($pattern, $source, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY), $expected, 'The SPLIT_PATTERN_SHORTHANDSYNTAX pattern did not split the input string correctly with a simple example.');
 
         $source = 'some {}string\\{Object.bla}here as well';
-        $expected = ['some {}string\\', '{Object.bla}','here as well'];
+        $expected = ['some {}string\\', '{Object.bla}', 'here as well'];
         $this->assertEquals(preg_split($pattern, $source, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY), $expected, 'The SPLIT_PATTERN_SHORTHANDSYNTAX pattern did not split the input string correctly with an escaped example. (1)');
 
         $source = 'some {f:viewHelper()} as well';
index 741e50f..11b0d22 100644 (file)
@@ -32,6 +32,6 @@ class ClassWithTwoGetters
      */
     public function getValue()
     {
-        return new ClassWithTwoGetters();
+        return new self();
     }
 }
index d27a35a..72fc08a 100644 (file)
@@ -415,7 +415,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\
         $user_sk = new \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\UserDomainClass(2, 'Sebastian', 'Kurfuerst');
         $user_rl = new \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\UserDomainClass(3, 'Robert', 'Lemke');
 
-        $this->arguments['options'] = [$user_is,$user_sk,$user_rl];
+        $this->arguments['options'] = [$user_is, $user_sk, $user_rl];
         $this->arguments['value'] = [$user_rl, $user_is];
         $this->arguments['optionLabelField'] = 'lastName';
         $this->arguments['name'] = 'myName';
index e6e31d3..b117e95 100644 (file)
@@ -2,7 +2,6 @@
 defined('TYPO3_MODE') or die();
 
 call_user_func(function () {
-
     $languageFilePrefix = 'LLL:EXT:fluid_styled_content/Resources/Private/Language/Database.xlf:';
     $frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
 
index c276a11..615a916 100644 (file)
@@ -31,7 +31,7 @@ class ElementBuilder
     public static function create(FormBuilder $formBuilder, Element $element, array $userDefinedTypoScript)
     {
         /** @var ElementBuilder $elementBuilder */
-        $elementBuilder = \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(ElementBuilder::class);
+        $elementBuilder = \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(self::class);
         $elementBuilder->setFormBuilder($formBuilder);
         $elementBuilder->setElement($element);
         $elementBuilder->setUserConfiguredElementTyposcript($userDefinedTypoScript);
@@ -476,9 +476,9 @@ class ElementBuilder
      */
     protected function arrayKeyExists($needle, array $haystack = [])
     {
-        return (
+        return
             isset($haystack[$needle]) || isset($haystack[$needle . '.'])
-        );
+        ;
     }
 
     /**
index 74d3861..fc9aa5a 100644 (file)
@@ -43,7 +43,7 @@ class FormBuilder
     public static function create(Configuration $configuration)
     {
         /** @var FormBuilder $formBuilder */
-        $formBuilder = \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(FormBuilder::class);
+        $formBuilder = \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(self::class);
         $formBuilder->setConfiguration($configuration);
         return $formBuilder;
     }
index 1db8464..f89458b 100644 (file)
@@ -31,7 +31,7 @@ class ValidationBuilder
     public static function create(Configuration $configuration)
     {
         /** @var ValidationBuilder $validationBuilder */
-        $validationBuilder = \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(ValidationBuilder::class);
+        $validationBuilder = \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(self::class);
         $validationBuilder->setConfiguration($configuration);
         return $validationBuilder;
     }
index 4a3e9bf..ad251c8 100644 (file)
@@ -35,7 +35,7 @@ class Configuration
      */
     public static function create()
     {
-        return \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(Configuration::class);
+        return \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(self::class);
     }
 
     /**
index 7c84410..15812fc 100644 (file)
@@ -81,9 +81,9 @@ class ValidationElement extends AbstractEntity
      */
     public function hasIncomingField($key)
     {
-        return (
+        return
             isset($this->incomingFields[$key])
             || array_key_exists($key, $this->incomingFields)
-        );
+        ;
     }
 }
index e899c0e..e1c80ef 100644 (file)
@@ -39,10 +39,10 @@ class RequiredValidator extends AbstractValidator
     {
         if (is_array($value)) {
             array_walk_recursive($value, function ($value, $key, $validator) {
-                    if (!empty($value) || $value === '0' || $value === 0) {
-                        $validator->setAllFieldsAreEmpty(false);
-                    }
-                },
+                if (!empty($value) || $value === '0' || $value === 0) {
+                    $validator->setAllFieldsAreEmpty(false);
+                }
+            },
                 $this
             );
             if ($this->getAllFieldsAreEmpty()) {
index fbe3b0a..bd00248 100644 (file)
@@ -31,7 +31,7 @@ class ControllerContext extends \TYPO3\CMS\Extbase\Mvc\Controller\ControllerCont
      */
     public static function extend(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $source)
     {
-        $controllerContext = \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(ControllerContext::class);
+        $controllerContext = \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(self::class);
         $propertyNames = ObjectAccess::getGettableProperties($source);
         foreach ($propertyNames as $propertyName => $propertyValue) {
             ObjectAccess::setProperty($controllerContext, $propertyName, $propertyValue);
index 53bb839..6efc341 100644 (file)
@@ -31,7 +31,7 @@ class CompatibilityLayerUtility
     public static function create(FormBuilder $formBuilder)
     {
         /** @var CompatibilityLayerUtility $compatibilityService */
-        $compatibilityService = \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(CompatibilityLayerUtility::class);
+        $compatibilityService = \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(self::class);
         $compatibilityService->setFormBuilder($formBuilder);
         return $compatibilityService;
     }
index 1f25050..a0c4999 100644 (file)
@@ -29,7 +29,7 @@ class FormUtility
     public static function create(Configuration $configuration)
     {
         /** @var FormBuilder $formBuilder */
-        $formUtility = FormUtility::getObjectManager()->get(FormUtility::class);
+        $formUtility = self::getObjectManager()->get(self::class);
         $formUtility->setConfiguration($configuration);
         return $formUtility;
     }
@@ -112,13 +112,13 @@ class FormUtility
      *
      *   If $type is set and $configuration['value'] isset
      *   return the value of $configuration['value'].
-     * 
+     *
      *   If $type is set and $configuration['value'] is not set
      *   return the value of $defaultMessage.
-     * 
+     *
      *   If $type is empty and $configuration['value'] isset
      *   return the value of $configuration['value'].
-     * 
+     *
      *   If $type is empty and $configuration['value'] is not set
      *   return the value of $defaultMessage.
      *
index 3b3456b..a641096 100644 (file)
@@ -60,7 +60,7 @@ class BetweenValidatorTest extends AbstractValidatorTest
     public function validInclusiveDataProvider()
     {
         return [
-            '1 ≤ 1 ≤ 1'                 => [[1,1,1]],
+            '1 ≤ 1 ≤ 1'                 => [[1, 1, 1]],
             '-10.1234 ≤ -10.12340 ≤ 10' => [[-10.1234, -10.12340, 10]],
             '-10.1234 ≤ -10 ≤ 10'       => [[-10.1234, -10.12340, 10]],
         ];
index 15234e0..be447a7 100644 (file)
@@ -73,7 +73,7 @@ class ContentContentObject extends AbstractContentObject
             $cobjValue = '';
             if (!empty($records)) {
                 $this->cObj->currentRecordTotal = count($records);
-                $this->getTimeTracker()->setTSlogMessage('NUMROWS: ' .  count($records));
+                $this->getTimeTracker()->setTSlogMessage('NUMROWS: ' . count($records));
 
                 /** @var $cObj ContentObjectRenderer */
                 $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
index b7efcd8..cb5f23e 100644 (file)
@@ -43,7 +43,7 @@ class ContentDataProcessor
             foreach ($processorKeys as $key) {
                 $className = $processors[$key];
                 if (!class_exists($className)) {
-                    throw new \UnexpectedValueException('Processor class name "' . $className . '" does not exist!',  1427455378);
+                    throw new \UnexpectedValueException('Processor class name "' . $className . '" does not exist!', 1427455378);
                 }
 
                 if (!in_array(DataProcessorInterface::class, class_implements($className), true)) {
index d4503fd..0227a0d 100644 (file)
@@ -1147,7 +1147,7 @@ class ContentObjectRenderer
     public function convertToUserIntObject()
     {
         if ($this->userObjectType !== self::OBJECTTYPE_USER) {
-            $this->getTimeTracker()->setTSlogMessage(ContentObjectRenderer::class . '::convertToUserIntObject() is called in the wrong context or for the wrong object type', 2);
+            $this->getTimeTracker()->setTSlogMessage(self::class . '::convertToUserIntObject() is called in the wrong context or for the wrong object type', 2);
         } else {
             $this->doConvertToUserIntObject = true;
         }
@@ -5440,7 +5440,7 @@ class ContentObjectRenderer
                     if (GeneralUtility::inList($allowTags, $tag[0]) || $denyTags != '*' && !GeneralUtility::inList($denyTags, $tag[0])) {
                         $contentAccum[$contentAccumP] .= $data;
                     } else {
-                        $contentAccum[$contentAccumP] .= HTMLSpecialChars($data);
+                        $contentAccum[$contentAccumP] .= htmlspecialchars($data);
                     }
                 }
                 $inside = 0;
index 8bf9f96..5b283de 100644 (file)
@@ -119,7 +119,7 @@ class CategoryMenuUtility
                 uasort(
                     $pages,
                     [
-                        CategoryMenuUtility::class,
+                        self::class,
                         'sortPagesUtility'
                     ]
                 );
index 04a4917..3a6e281 100644 (file)
@@ -2450,7 +2450,7 @@ class TypoScriptFrontendController
                     if ($debugCacheTime) {
                         $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];
                         $timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
-                        $this->content .= LF . '<!-- Cached page generated ' . date(($dateFormat . ' ' . $timeFormat), $row['tstamp']) . '. Expires ' . Date(($dateFormat . ' ' . $timeFormat), $row['expires']) . ' -->';
+                        $this->content .= LF . '<!-- Cached page generated ' . date(($dateFormat . ' ' . $timeFormat), $row['tstamp']) . '. Expires ' . date(($dateFormat . ' ' . $timeFormat), $row['expires']) . ' -->';
                     }
                 }
                 $this->getTimeTracker()->pull();
index 4413704..c66298b 100644 (file)
@@ -47,7 +47,7 @@ class FilesProcessor implements DataProcessorInterface
      * @param array $processedData Key/value store of processed data (e.g. to be passed to a Fluid View)
      * @return array the processed data as key/value store
      */
-    public function process(ContentObjectRenderer $cObj, array $contentObjectConfiguration, array $processorConfiguration,  array $processedData)
+    public function process(ContentObjectRenderer $cObj, array $contentObjectConfiguration, array $processorConfiguration, array $processedData)
     {
         if (isset($processorConfiguration['if.']) && !$cObj->checkIf($processorConfiguration['if.'])) {
             return $processedData;
index 42e252c..6c6fd66 100644 (file)
@@ -439,8 +439,8 @@ class GifBuilder extends GraphicalFunctions
         } else {
             // Fill the background with the given color
             $BGcols = $this->convertColor($this->setup['backColor']);
-            $Bcolor = ImageColorAllocate($this->im, $BGcols[0], $BGcols[1], $BGcols[2]);
-            ImageFilledRectangle($this->im, 0, 0, $XY[0], $XY[1], $Bcolor);
+            $Bcolor = imagecolorallocate($this->im, $BGcols[0], $BGcols[1], $BGcols[2]);
+            imagefilledrectangle($this->im, 0, 0, $XY[0], $XY[1], $Bcolor);
         }
         // Traverse the GIFBUILDER objects an render each one:
         if (is_array($this->setup)) {
@@ -560,7 +560,7 @@ class GifBuilder extends GraphicalFunctions
         if (!$this->saveAlphaLayer) {
             if ($this->setup['transparentBackground']) {
                 // Auto transparent background is set
-                $Bcolor = ImageColorClosest($this->im, $BGcols[0], $BGcols[1], $BGcols[2]);
+                $Bcolor = imagecolorclosest($this->im, $BGcols[0], $BGcols[1], $BGcols[2]);
                 imagecolortransparent($this->im, $Bcolor);
             } elseif (is_array($this->setup['transparentColor_array'])) {
                 // Multiple transparent colors are set. This is done via the trick that all transparent colors get
index b046296..2c851cc 100644 (file)
@@ -193,8 +193,8 @@ class PageRepository
             // versioning preview (that means we are online!)
             $this->where_hid_del = $this->enableFields('pages', $show_hidden, ['fe_group' => true], true);
         }
-        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][PageRepository::class]['init'])) {
-            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][PageRepository::class]['init'] as $classRef) {
+        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['init'])) {
+            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['init'] as $classRef) {
                 $hookObject = GeneralUtility::makeInstance($classRef);
                 if (!$hookObject instanceof PageRepositoryInitHookInterface) {
                     throw new \UnexpectedValueException($hookObject . ' must implement interface ' . PageRepositoryInitHookInterface::class, 1379579812);
index de5c108..251c34c 100644 (file)
@@ -671,7 +671,7 @@ class AdminPanelView
             }
             $icon = $this->iconFactory->getIcon('actions-document-new', Icon::SIZE_SMALL)->render();
             $link = $newContentWizScriptPath . 'id=' . $id . $params . '&returnUrl=' . rawurlencode($returnUrl);
-            $toolBar .= '<a class="t3-icon btn btn-default" href="' . htmlspecialchars($link) . '" title="' . $this->extGetLL('edit_newContentElement') .  '"">' . $icon . '</a>';
+            $toolBar .= '<a class="t3-icon btn btn-default" href="' . htmlspecialchars($link) . '" title="' . $this->extGetLL('edit_newContentElement') . '"">' . $icon . '</a>';
         }
         if ($perms & Permission::PAGE_EDIT) {
             $icon = $this->iconFactory->getIcon('actions-document-move', Icon::SIZE_SMALL)->render();
index d81a998..f9ed8d8 100644 (file)
@@ -503,9 +503,9 @@ class ImportExportController extends BaseScriptClass
             // Export for download:
             if ($inData['download_export']) {
                 $mimeType = 'application/octet-stream';
-                Header('Content-Type: ' . $mimeType);
-                Header('Content-Length: ' . strlen($out));
-                Header('Content-Disposition: attachment; filename=' . basename($dlFile));
+                header('Content-Type: ' . $mimeType);
+                header('Content-Length: ' . strlen($out));
+                header('Content-Disposition: attachment; filename=' . basename($dlFile));
                 echo $out;
                 die;
             }
@@ -876,7 +876,7 @@ class ImportExportController extends BaseScriptClass
                         }
                     }
                     $import->display_import_pid_record = $this->pageinfo;
-                    $this->standaloneView->assign('contentOverview',  $import->displayContentOverview());
+                    $this->standaloneView->assign('contentOverview', $import->displayContentOverview());
                 }
                 // Compile messages which are inhibiting a proper import and add them to output.
                 if (!empty($importInhibitedMessages)) {
index 9fa727f..bd175c7 100644 (file)
@@ -40,7 +40,7 @@ class CrawlerHook
     /**
      * @var string
      */
-    public $callBack = CrawlerHook::class;
+    public $callBack = self::class;
 
     /**
      * The constructor
index b90fae0..f74e39a 100644 (file)
@@ -78,7 +78,7 @@ class DatabaseData extends AbstractStepAction
             );
             $result[] = $errorStatus;
             return $result;
-        };
+        }
 
         // Set password as install tool password
         $configurationManager->setLocalConfigurationValueByPath('BE/installToolPassword', $this->getHashedPassword($password));
index dbd194a..f749018 100644 (file)
@@ -168,7 +168,7 @@ class TestSetup extends Action\AbstractAction
     protected function getEmailSubject()
     {
         $name = !empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'])
-            ? ' from site "' .  $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '"'
+            ? ' from site "' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . '"'
             : '';
         return 'Test TYPO3 CMS mail delivery' . $name;
     }
index 4891f4c..08edf78 100644 (file)
@@ -269,7 +269,7 @@ class DirectoryNode extends AbstractNode implements NodeInterface
     protected function isDirectory()
     {
         $path = $this->getAbsolutePath();
-        return (!@is_link($path) && @is_dir($path));
+        return !@is_link($path) && @is_dir($path);
     }
 
     /**
index aa98af5..c63a63d 100644 (file)
@@ -306,6 +306,6 @@ class FileNode extends AbstractNode implements NodeInterface
     protected function isFile()
     {
         $path = $this->getAbsolutePath();
-        return (!is_link($path) && is_file($path));
+        return !is_link($path) && is_file($path);
     }
 }
index 0f36957..e1f256d 100644 (file)
@@ -62,6 +62,6 @@ class ContextService
      */
     public function getContextString()
     {
-        return ($this->isBackendContext() ? 'backend' : 'standalone');
+        return $this->isBackendContext() ? 'backend' : 'standalone';
     }
 }
index ebabf19..0bb2fe7 100644 (file)
@@ -230,7 +230,7 @@ class CoreUpdateService
 
             if (!$this->checkCoreFilesAvailable($version)) {
                 // Explicit write check to upper directory of current core location
-                $coreLocation = @realPath($this->symlinkToCoreFiles . '/../');
+                $coreLocation = @realpath($this->symlinkToCoreFiles . '/../');
                 $file = $coreLocation . '/' . StringUtility::getUniqueId('install-core-update-test-');
                 $result = @touch($file);
                 if (!$result) {
@@ -448,7 +448,7 @@ class CoreUpdateService
             $messages[] = $message;
         } else {
             $downloadedCoreLocation = $this->downloadTargetPath . 'typo3_src-' . $version;
-            $newCoreLocation = @realPath($this->symlinkToCoreFiles . '/../') . '/typo3_src-' . $version;
+            $newCoreLocation = @realpath($this->symlinkToCoreFiles . '/../') . '/typo3_src-' . $version;
 
             if (!@is_dir($downloadedCoreLocation)) {
                 $success = false;
@@ -484,7 +484,7 @@ class CoreUpdateService
      */
     public function activateVersion($version)
     {
-        $newCoreLocation = @realPath($this->symlinkToCoreFiles . '/../') . '/typo3_src-' . $version;
+        $newCoreLocation = @realpath($this->symlinkToCoreFiles . '/../') . '/typo3_src-' . $version;
 
         $messages = [];
         $success = true;
@@ -568,7 +568,7 @@ class CoreUpdateService
      */
     protected function checkCoreFilesAvailable($version)
     {
-        $newCoreLocation = @realPath($this->symlinkToCoreFiles . '/../') . '/typo3_src-' . $version;
+        $newCoreLocation = @realpath($this->symlinkToCoreFiles . '/../') . '/typo3_src-' . $version;
         return @is_dir($newCoreLocation);
     }
 }
index eef574c..d9bebff 100644 (file)
@@ -194,7 +194,7 @@ class EnableFileService
     protected static function getFirstInstallFilePaths()
     {
         $files = array_filter(scandir(self::$sitePath), function ($file) {
-            return (@is_file(self::$sitePath . $file) && preg_match('~^' . self::FIRST_INSTALL_FILE_PATH . '.*~i', $file));
+            return @is_file(self::$sitePath . $file) && preg_match('~^' . self::FIRST_INSTALL_FILE_PATH . '.*~i', $file);
         });
         return $files;
     }
index 4112044..c43bc66 100644 (file)
@@ -198,7 +198,7 @@ class SessionService implements \TYPO3\CMS\Core\SingletonInterface
      */
     public function hasSession()
     {
-        return ($_SESSION['active'] === true);
+        return $_SESSION['active'] === true;
     }
 
     /**
index 6bfacef..eef57ef 100644 (file)
@@ -288,7 +288,9 @@ class SqlSchemaMigrationService
                                         // "PRIMARY KEY" is being returned from the DB in upper case.
                                         $fieldC = preg_replace_callback(
                                             '/^([a-zA-Z0-9]+)(\([^)]*\)\s.*)/',
-                                            function ($matches) { return strtolower($matches[1]) . $matches[2]; },
+                                            function ($matches) {
+                                                return strtolower($matches[1]) . $matches[2];
+                                            },
                                             $fieldC
                                         );
 
index 2270f3e..8393745 100644 (file)
@@ -1546,7 +1546,7 @@ class Check
      */
     protected function getBytesFromSizeMeasurement($measurement)
     {
-        $bytes = doubleval($measurement);
+        $bytes = floatval($measurement);
         if (stripos($measurement, 'G')) {
             $bytes *= 1024 * 1024 * 1024;
         } elseif (stripos($measurement, 'M')) {
index 701690f..194f038 100644 (file)
@@ -69,7 +69,7 @@ class RegistryService
     {
         $namespace = (is_string($namespace) ? $namespace : $this->namespaceIdentifier);
         $value = $this->registry->get($namespace, $name, '__NOTFOUND__');
-        return ($value !== '__NOTFOUND__');
+        return $value !== '__NOTFOUND__';
     }
 
     /**
index d0649cd..8cb0f93 100644 (file)
@@ -97,7 +97,7 @@ class InternalLinktype extends AbstractLinktype
             $this->setErrorParams($this->errorParams);
         }
 
-        return ($this->responsePage && $this->responseContent);
+        return $this->responsePage && $this->responseContent;
     }
 
     /**
index 29eaf50..a6f54f6 100644 (file)
@@ -237,7 +237,7 @@ class RecordList extends AbstractModule
         // Initialize menu
         $this->menuConfig();
         // Store session data
-        $backendUser->setAndSaveSessionData(RecordList::class, $sessionData);
+        $backendUser->setAndSaveSessionData(self::class, $sessionData);
         $this->getPageRenderer()->addInlineLanguageLabelFile('EXT:lang/locallang_mod_web_list.xlf');
     }
 
index a19dacc..c564a57 100644 (file)
@@ -222,7 +222,7 @@ class SecurityStatus implements \TYPO3\CMS\Reports\StatusProviderInterface
             case FlashMessage::INFO:
                 $messageDetail .= $resultCheck['html'];
                 break;
-            case FlashMessage::WARNING;
+            case FlashMessage::WARNING:
                 $severity = \TYPO3\CMS\Reports\Status::WARNING;
                 $messageDetail .= $resultCheck['html'];
                 break;
index b128fcd..3e15b92 100644 (file)
@@ -74,12 +74,12 @@ class RsaAuthService extends \TYPO3\CMS\Sv\AuthenticationService
                     $isProcessed = true;
                 } else {
                     if ($this->pObj->writeDevLog) {
-                        GeneralUtility::devLog('Process login data: Failed to RSA decrypt password', RsaAuthService::class);
+                        GeneralUtility::devLog('Process login data: Failed to RSA decrypt password', self::class);
                     }
                 }
             } else {
                 if ($this->pObj->writeDevLog) {
-                    GeneralUtility::devLog('Process login data: passwordTransmissionStrategy has been set to "rsa" but no rsa encrypted password has been found.', RsaAuthService::class);
+                    GeneralUtility::devLog('Process login data: passwordTransmissionStrategy has been set to "rsa" but no rsa encrypted password has been found.', self::class);
                 }
             }
         }
index 1c85876..a18013e 100644 (file)
@@ -177,7 +177,7 @@ class SpellCheckingController
         if (!$this->pspell_is_available || $this->forceCommandMode) {
             $AspellVersionString = explode('Aspell', shell_exec($this->AspellDirectory . ' -v'));
             $AspellVersion = substr($AspellVersionString[1], 0, 4);
-            if (doubleval($AspellVersion) < doubleval('0.5') && (!$this->pspell_is_available || $this->forceCommandMode)) {
+            if (floatval($AspellVersion) < floatval('0.5') && (!$this->pspell_is_available || $this->forceCommandMode)) {
                 echo 'Configuration problem: Aspell version ' . $AspellVersion . ' too old. Spell checking cannot be performed in command mode.';
             }
             $this->defaultAspellEncoding = trim(shell_exec($this->AspellDirectory . ' config encoding'));
@@ -347,7 +347,7 @@ var selectedDictionary = "' . $this->dictionary . '";
             // Calculating parsing and spell checkting time
             $time = number_format(microtime(true) - $time_start, 2, ',', ' ');
             // Insert spellcheck info
-            $this->result .= 'var spellcheckInfo = { "Total words":"' . $this->wordCount . '","Misspelled words":"' . sizeof($this->misspelled) . '","Total suggestions":"' . $this->suggestionCount . '","Total words suggested":"' . $this->suggestedWordCount . '","Spelling checked in":"' . $time . '" };
+            $this->result .= 'var spellcheckInfo = { "Total words":"' . $this->wordCount . '","Misspelled words":"' . count($this->misspelled) . '","Total suggestions":"' . $this->suggestionCount . '","Total words suggested":"' . $this->suggestedWordCount . '","Spelling checked in":"' . $time . '" };
 // -->
 /*]]>*/
 </script>
@@ -589,14 +589,14 @@ var selectedDictionary = "' . $this->dictionary . '";
                 if ($this->pspell_is_available && !$this->forceCommandMode) {
                     if (!pspell_check($this->pspell_link, $word)) {
                         if (!in_array($word, $this->misspelled)) {
-                            if (sizeof($this->misspelled) != 0) {
+                            if (count($this->misspelled) != 0) {
                                 $this->suggestedWords .= ',';
                             }
                             $suggest = [];
                             $suggest = pspell_suggest($this->pspell_link, $word);
-                            if (sizeof($suggest) != 0) {
+                            if (count($suggest) != 0) {
                                 $this->suggestionCount++;
-                                $this->suggestedWordCount += sizeof($suggest);
+                                $this->suggestedWordCount += count($suggest);
                             }
                             $this->suggestedWords .= '"' . $word . '":"' . implode(',', $suggest) . '"';
                             $this->misspelled[] = $word;
@@ -637,7 +637,7 @@ var selectedDictionary = "' . $this->dictionary . '";
                     GeneralUtility::unlink_tempfile($tmpFileName);
                     if ($AspellResultLines['1'][0] !== '*') {
                         if (!in_array($word, $this->misspelled)) {
-                            if (sizeof($this->misspelled) != 0) {
+                            if (count($this->misspelled) != 0) {
                                 $this->suggestedWords .= ',';
                             }
                             $suggest = [];
@@ -646,9 +646,9 @@ var selectedDictionary = "' . $this->dictionary . '";
                                 $suggestions = GeneralUtility::trimExplode(':', $AspellResultLines['1'], true);
                                 $suggest = GeneralUtility::trimExplode(',', $suggestions['1'], true);
                             }
-                            if (sizeof($suggest) != 0) {
+                            if (count($suggest) != 0) {
                                 $this->suggestionCount++;
-                                $this->suggestedWordCount += sizeof($suggest);
+                                $this->suggestedWordCount += count($suggest);
                             }
                             $this->suggestedWords .= '"' . $word . '":"' . implode(',', $suggest) . '"';
                             $this->misspelled[] = $word;
index 55b6eed..7d6da0b 100644 (file)
@@ -394,7 +394,7 @@ class AddImageHandler implements LinkParameterProviderInterface, LinkHandlerInte
                                        <tr class="file_list_normal">
                                                <td class="col-title" nowrap="nowrap">' . $filenameAndIcon . '&nbsp;</td>
                                                <td class="col-control">
-                                                       <div class="btn-group">' . $ATag . '<span title="' .  $lang->getLL('addToList', true) . '">' . $this->iconFactory->getIcon('actions-edit-add', Icon::SIZE_SMALL)->render() . '</span>' . $ATag_e . '
+                                                       <div class="btn-group">' . $ATag . '<span title="' . $lang->getLL('addToList', true) . '">' . $this->iconFactory->getIcon('actions-edit-add', Icon::SIZE_SMALL)->render() . '</span>' . $ATag_e . '
                                                        <a href="' . htmlspecialchars($Ahref) . '" class="btn btn-default" title="' . $lang->getLL('info', true) . '">' . $this->iconFactory->getIcon('actions-document-info', Icon::SIZE_SMALL) . '</a>
                                                </td>
                                                <td class="col-clipboard" valign="top">' . $bulkCheckBox . '</td>
index 51783b9..55503dc 100644 (file)
@@ -210,7 +210,7 @@ class BlowfishSalt extends Md5Salt
         }
         // Check whether the iteration count used differs from the standard number.
         $countLog2 = $this->getCountLog2($saltedPW);
-        return !is_NULL($countLog2) && $countLog2 < $this->getHashCount();
+        return !is_null($countLog2) && $countLog2 < $this->getHashCount();
     }
 
     /**
@@ -272,7 +272,7 @@ class BlowfishSalt extends Md5Salt
      */
     public function setHashCount($hashCount = null)
     {
-        self::$hashCount = !is_NULL($hashCount) && is_int($hashCount) && $hashCount >= $this->getMinHashCount() && $hashCount <= $this->getMaxHashCount() ? $hashCount : self::HASH_COUNT;
+        self::$hashCount = !is_null($hashCount) && is_int($hashCount) && $hashCount >= $this->getMinHashCount() && $hashCount <= $this->getMaxHashCount() ? $hashCount : self::HASH_COUNT;
     }
 
     /**
@@ -285,7 +285,7 @@ class BlowfishSalt extends Md5Salt
      */
     public function setMaxHashCount($maxHashCount = null)
     {
-        self::$maxHashCount = !is_NULL($maxHashCount) && is_int($maxHashCount) ? $maxHashCount : self::MAX_HASH_COUNT;
+        self::$maxHashCount = !is_null($maxHashCount) && is_int($maxHashCount) ? $maxHashCount : self::MAX_HASH_COUNT;
     }
 
     /**
@@ -298,6 +298,6 @@ class BlowfishSalt extends Md5Salt
      */
     public function setMinHashCount($minHashCount = null)
     {
-        self::$minHashCount = !is_NULL($minHashCount) && is_int($minHashCount) ? $minHashCount : self::MIN_HASH_COUNT;
+        self::$minHashCount = !is_null($minHashCount) && is_int($minHashCount) ? $minHashCount : self::MIN_HASH_COUNT;
     }
 }
index 5a7abdf..060deb8 100644 (file)
@@ -368,7 +368,7 @@ class PhpassSalt extends AbstractSalt implements SaltInterface
      */
     public function setHashCount($hashCount = null)
     {
-        self::$hashCount = !is_NULL($hashCount) && is_int($hashCount) && $hashCount >= $this->getMinHashCount() && $hashCount <= $this->getMaxHashCount() ? $hashCount : self::HASH_COUNT;
+        self::$hashCount = !is_null($hashCount) && is_int($hashCount) && $hashCount >= $this->getMinHashCount() && $hashCount <= $this->getMaxHashCount() ? $hashCount : self::HASH_COUNT;
     }
 
     /**
@@ -381,7 +381,7 @@ class PhpassSalt extends AbstractSalt implements SaltInterface
      */
     public function setMaxHashCount($maxHashCount = null)
     {
-        self::$maxHashCount = !is_NULL($maxHashCount) && is_int($maxHashCount) ? $maxHashCount : self::MAX_HASH_COUNT;
+        self::$maxHashCount = !is_null($maxHashCount) && is_int($maxHashCount) ? $maxHashCount : self::MAX_HASH_COUNT;
     }
 
     /**
@@ -394,6 +394,6 @@ class PhpassSalt extends AbstractSalt implements SaltInterface
      */
     public function setMinHashCount($minHashCount = null)
     {
-        self::$minHashCount = !is_NULL($minHashCount) && is_int($minHashCount) ? $minHashCount : self::MIN_HASH_COUNT;
+        self::$minHashCount = !is_null($minHashCount) && is_int($minHashCount) ? $minHashCount : self::MIN_HASH_COUNT;
     }
 }
index accf62c..446a4bc 100644 (file)
@@ -124,7 +124,7 @@ class ExtensionManagerConfigurationUtility
             case FlashMessage::OK:
                 $class = 'success';
                 break;
-            case FlashMessage::WARNING;
+            case FlashMessage::WARNING:
                 $class = 'warning';
                 break;
             case FlashMessage::ERROR:
index 3181531..526ee3d 100644 (file)
@@ -21,7 +21,6 @@ namespace TYPO3\CMS\Scheduler\Task;
  */
 abstract class AbstractTask
 {
-
     const TYPE_SINGLE = 1;
     const TYPE_RECURRING = 2;
 
index 1ae5c20..fab49fb 100644 (file)
@@ -66,7 +66,7 @@ class AuthenticationService extends AbstractAuthenticationService
             GeneralUtility::sysLog(sprintf('Login-attempt from %s (%s), username \'%s\' not found!', $this->authInfo['REMOTE_ADDR'], $this->authInfo['REMOTE_HOST'], $this->login['uname']), 'core', GeneralUtility::SYSLOG_SEVERITY_WARNING);
         } else {
             if ($this->writeDevLog) {
-                GeneralUtility::devLog('User found: ' . GeneralUtility::arrayToLogString($user, [$this->db_user['userid_column'], $this->db_user['username_column']]), AuthenticationService::class);
+                GeneralUtility::devLog('User found: ' . GeneralUtility::arrayToLogString($user, [$this->db_user['userid_column'], $this->db_user['username_column']]), self::class);
             }
         }
         return $user;
@@ -100,7 +100,7 @@ class AuthenticationService extends AbstractAuthenticationService
                     GeneralUtility::sysLog(sprintf('Login-attempt from %s (%s), username \'%s\', password not accepted!', $this->authInfo['REMOTE_ADDR'], $this->authInfo['REMOTE_HOST'], $this->login['uname']), 'core', GeneralUtility::SYSLOG_SEVERITY_WARNING);
                 }
                 if ($this->writeDevLog) {
-                    GeneralUtility::devLog('Password not accepted: ' . $this->login['uident'], AuthenticationService::class, 2);
+                    GeneralUtility::devLog('Password not accepted: ' . $this->login['uident'], self::class, 2);
                 }
             }
             // Checking the domain (lockToDomain)
@@ -168,7 +168,7 @@ class AuthenticationService extends AbstractAuthenticationService
                 }
             } else {
                 if ($this->writeDevLog) {
-                    GeneralUtility::devLog('No usergroups found.', AuthenticationService::class, 2);
+                    GeneralUtility::devLog('No usergroups found.', self::class, 2);
                 }
             }
         }
index 1feb4c8..3a1fdb8 100644 (file)
@@ -93,7 +93,7 @@ class Bootstrap
             return false;
         }
         // check if there are records
-        return ($this->databaseConnection->exec_SELECTcountRows('*', 'sys_note', 'pid IN (' . $pidList . ')' . BackendUtility::deleteClause('sys_note')) > 0);
+        return $this->databaseConnection->exec_SELECTcountRows('*', 'sys_note', 'pid IN (' . $pidList . ')' . BackendUtility::deleteClause('sys_note')) > 0;
     }
 
     /**
index 4f13509..e17807a 100644 (file)
@@ -474,7 +474,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass
         if ($newStandardTemplate) {
             // Hook to change output, implemented for statictemplates
             if (isset(
-                $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][TypoScriptTemplateModuleController::class]['newStandardTemplateView']
+                $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['newStandardTemplateView']
             )) {
                 $selector = '';
                 $staticsText = '';
@@ -483,7 +483,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass
                     'staticsText' => &$staticsText
                 ];
                 GeneralUtility::callUserFunction(
-                    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][TypoScriptTemplateModuleController::class]['newStandardTemplateView'],
+                    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['newStandardTemplateView'],
                     $reference,
                     $this
                 );
@@ -566,14 +566,14 @@ class TypoScriptTemplateModuleController extends BaseScriptClass
         } elseif (GeneralUtility::_GP('newWebsite')) {
             // Hook to handle row data, implemented for statictemplates
             if (isset(
-                $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][TypoScriptTemplateModuleController::class]['newStandardTemplateHandler']
+                $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['newStandardTemplateHandler']
             )) {
                 $reference = [
                     'recData' => &$recData,
                     'id' => $id,
                 ];
                 GeneralUtility::callUserFunction(
-                    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][TypoScriptTemplateModuleController::class]['newStandardTemplateHandler'],
+                    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['newStandardTemplateHandler'],
                     $reference,
                     $this
                 );
index a9cb8e7..231c35f 100644 (file)
@@ -404,7 +404,7 @@ class TypoScriptTemplateObjectBrowserModuleFunctionController extends AbstractFu
             // back
             $out = $lang->getLL('back');
             $out = '<a href="' . htmlspecialchars($aHref) . '" class="btn btn-default"><strong><i class="fa fa-chevron-left"></i>&nbsp;' . $out . '</strong></a>';
-            $theOutput .= '<div><hr style="margin-top: 5px; margin-bottom: 5px;" />'  . $out . '</div>';
+            $theOutput .= '<div><hr style="margin-top: 5px; margin-bottom: 5px;" />' . $out . '</div>';
         } else {
             $templateService->tsbrowser_depthKeys = $this->pObj->MOD_SETTINGS['tsbrowser_depthKeys_' . $bType];
             if (GeneralUtility::_POST('search') && GeneralUtility::_POST('search_field')) {
@@ -502,7 +502,7 @@ class TypoScriptTemplateObjectBrowserModuleFunctionController extends AbstractFu
             $theOutput .= '<div class="panel-heading">';
             $theOutput .= '<strong>' . $label . ' ' . $remove . '</strong>';
             $theOutput .= '</div>';
-            $theOutput .= '<div class="panel-body">' . $tree  .  '</div>';
+            $theOutput .= '<div class="panel-body">' . $tree . '</div>';
             $theOutput .= '</div>';
 
             // second row options
index 1577481..08af017 100644 (file)
@@ -268,7 +268,7 @@ class PreviewHook implements \TYPO3\CMS\Core\SingletonInterface
                         if (GeneralUtility::_GP($this->previewKey)) {
                             // Lifetime is 1 hour, does it matter much?
                             // Requires the user to click the link from their email again if it expires.
-                            SetCookie($this->previewKey, GeneralUtility::_GP($this->previewKey), 0, GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'));
+                            setcookie($this->previewKey, GeneralUtility::_GP($this->previewKey), 0, GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'));
                         }
                         return $previewConfig;
                     } elseif (GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'index.php?' . $this->previewKey . '=' . $inputCode === GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')) {
index 91aab21..f156edc 100644 (file)
@@ -74,7 +74,7 @@ class StageRecord extends AbstractRecord
         if (empty($record)) {
             $record = static::fetch('sys_workspace_stage', $uid);
         }
-        return new StageRecord($workspace, $record);
+        return new self($workspace, $record);
     }
 
     /**
@@ -196,7 +196,7 @@ class StageRecord extends AbstractRecord
      */
     public function isEditStage()
     {
-        return ($this->getUid() === StagesService::STAGE_EDIT_ID);
+        return $this->getUid() === StagesService::STAGE_EDIT_ID;
     }
 
     /**
@@ -204,7 +204,7 @@ class StageRecord extends AbstractRecord
      */
     public function isPublishStage()
     {
-        return ($this->getUid() === StagesService::STAGE_PUBLISH_ID);
+        return $this->getUid() === StagesService::STAGE_PUBLISH_ID;
     }
 
     /**
@@ -212,7 +212,7 @@ class StageRecord extends AbstractRecord
      */
     public function isExecuteStage()
     {
-        return ($this->getUid() === StagesService::STAGE_PUBLISH_EXECUTE_ID);
+        return $this->getUid() === StagesService::STAGE_PUBLISH_EXECUTE_ID;
     }
 
     /**
@@ -220,7 +220,7 @@ class StageRecord extends AbstractRecord
      */
     public function isDialogEnabled()
     {
-        return (((int)$this->record['allow_notificaton_settings'] & 1) > 0);
+        return ((int)$this->record['allow_notificaton_settings'] & 1) > 0;
     }
 
     /**
@@ -228,7 +228,7 @@ class StageRecord extends AbstractRecord
      */
     public function isPreselectionChangeable()
     {
-        return (((int)$this->record['allow_notificaton_settings'] & 2) > 0);
+        return ((int)$this->record['allow_notificaton_settings'] & 2) > 0;
     }
 
     /**
@@ -236,7 +236,7 @@ class StageRecord extends AbstractRecord
      */
     public function areOwnersPreselected()
     {
-        return (((int)$this->record['notification_preselection'] & 1) > 0);
+        return ((int)$this->record['notification_preselection'] & 1) > 0;
     }
 
     /**
@@ -244,7 +244,7 @@ class StageRecord extends AbstractRecord
      */
     public function areMembersPreselected()
     {
-        return (((int)$this->record['notification_preselection'] & 2) > 0);
+        return ((int)$this->record['notification_preselection'] & 2) > 0;
     }
 
     /**
@@ -252,7 +252,7 @@ class StageRecord extends AbstractRecord
      */
     public function areEditorsPreselected()
     {
-        return (((int)$this->record['notification_preselection'] & 4) > 0);
+        return ((int)$this->record['notification_preselection'] & 4) > 0;
     }
 
     /**
@@ -260,7 +260,7 @@ class StageRecord extends AbstractRecord
      */
     public function areResponsiblePersonsPreselected()
     {
-        return (((int)$this->record['notification_preselection'] & 8) > 0);
+        return ((int)$this->record['notification_preselection'] & 8) > 0;
     }
 
     /**
@@ -268,12 +268,12 @@ class StageRecord extends AbstractRecord
      */
     public function hasPreselection()
     {
-        return (
+        return
             $this->areOwnersPreselected()
             || $this->areMembersPreselected()
             || $this->areEditorsPreselected()
             || $this->areResponsiblePersonsPreselected()
-        );
+        ;
     }
 
     /**
@@ -356,10 +356,10 @@ class StageRecord extends AbstractRecord
      */
     public function isAllowed()
     {
-        return (
+        return
             $this->isEditStage()
             || static::getBackendUser()->workspaceCheckStageForCurrent($this->getUid())
             || $this->isExecuteStage() && static::getBackendUser()->workspacePublishAccess($this->workspace->getUid())
-        );
+        ;
     }
 }
index 30ea9eb..58470b1 100644 (file)
@@ -456,10 +456,10 @@ class GridDataService
      */
     protected function isSortable(array $a, array $b)
     {
-        return (
+        return
             $a[self::GridColumn_CollectionLevel] === 0 && $b[self::GridColumn_CollectionLevel] === 0
             || $a[self::GridColumn_CollectionParent] === $b[self::GridColumn_CollectionParent]
-        );
+        ;
     }
 
     /**
index eafef39..1bb434b 100644 (file)
@@ -227,7 +227,9 @@ class StagesService implements \TYPO3\CMS\Core\SingletonInterface
             }
         }
 
-        uasort($allowedStages, function (StageRecord $first, StageRecord $second) { return $first->determineOrder($second); });
+        uasort($allowedStages, function (StageRecord $first, StageRecord $second) {
+            return $first->determineOrder($second);
+        });
         return $this->prepareStagesArray($allowedStages);
     }
 
index 4a3ef24..be8fa4d 100644 (file)
@@ -54,7 +54,7 @@ class WorkspaceServiceTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase
         $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
         $result = $service->selectVersionsInWorkspace(91, 0, -99, 2);
         $this->assertTrue(is_array($result), 'The result from workspace 91 is supposed to be an array');
-        $this->assertEquals(1, sizeof($result['pages']), 'The result is supposed to contain one version for this page in workspace 91');
+        $this->assertEquals(1, count($result['pages']), 'The result is supposed to contain one version for this page in workspace 91');
         $this->assertEquals(102, $result['pages'][0]['uid'], 'Wrong workspace overlay record picked');
         $this->assertEquals(1, $result['pages'][0]['livepid'], 'Real pid wasn\'t resolved correctly');
     }
@@ -69,7 +69,7 @@ class WorkspaceServiceTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase
         $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
         $result = $service->selectVersionsInWorkspace(\TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES, 0, -99, 2);
         $this->assertTrue(is_array($result), 'The result from workspace 91 is supposed to be an array');
-        $this->assertEquals(2, sizeof($result['pages']), 'The result is supposed to contain one version for this page in workspace 91');
+        $this->assertEquals(2, count($result['pages']), 'The result is supposed to contain one version for this page in workspace 91');
     }
 
     /**
@@ -82,7 +82,7 @@ class WorkspaceServiceTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase
         $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
         $result = $service->selectVersionsInWorkspace(91, 0, -99, 1, 99);
         $this->assertTrue(is_array($result), 'The result from workspace 91 is supposed to be an array');
-        $this->assertEquals(4, sizeof($result['pages']), 'The result is supposed to contain four versions for this page in workspace 91');
+        $this->assertEquals(4, count($result['pages']), 'The result is supposed to contain four versions for this page in workspace 91');
     }
 
     /**
@@ -96,13 +96,13 @@ class WorkspaceServiceTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase
         // testing stage 1
         $result = $service->selectVersionsInWorkspace(91, 0, 1, 1, 99);
         $this->assertTrue(is_array($result), 'The result from workspace 91 is supposed to be an array');
-        $this->assertEquals(2, sizeof($result['pages']), 'The result is supposed to contain two versions for this page in workspace 91');
+        $this->assertEquals(2, count($result['pages']), 'The result is supposed to contain two versions for this page in workspace 91');
         $this->assertEquals(102, $result['pages'][0]['uid'], 'First records is supposed to have the uid 102');
         $this->assertEquals(105, $result['pages'][1]['uid'], 'First records is supposed to have the uid 105');
         // testing stage 2
         $result = $service->selectVersionsInWorkspace(91, 0, 2, 1, 99);
         $this->assertTrue(is_array($result), 'The result from workspace 91 is supposed to be an array');
-        $this->assertEquals(2, sizeof($result['pages']), 'The result is supposed to contain two versions for this page in workspace 91');
+        $this->assertEquals(2, count($result['pages']), 'The result is supposed to contain two versions for this page in workspace 91');
         $this->assertEquals(104, $result['pages'][0]['uid'], 'First records is supposed to have the uid 106');
         $this->assertEquals(106, $result['pages'][1]['uid'], 'First records is supposed to have the uid 106');
     }
@@ -118,13 +118,13 @@ class WorkspaceServiceTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase
         // testing all "draft" records
         $result = $service->selectVersionsInWorkspace(91, 1, -99, 1, 99);
         $this->assertTrue(is_array($result), 'The result from workspace 91 is supposed to be an array');
-        $this->assertEquals(2, sizeof($result['pages']), 'The result is supposed to contain three versions for this page in workspace 91');
+        $this->assertEquals(2, count($result['pages']), 'The result is supposed to contain three versions for this page in workspace 91');
         // testing all "archive" records
         $result = $service->selectVersionsInWorkspace(91, 2, -99, 1, 99);
-        $this->assertEquals(2, sizeof($result['pages']), 'The result is supposed to contain two versions for this page in workspace 91');
+        $this->assertEquals(2, count($result['pages']), 'The result is supposed to contain two versions for this page in workspace 91');
         // testing both types records
         $result = $service->selectVersionsInWorkspace(91, 0, -99, 1, 99);
-        $this->assertEquals(4, sizeof($result['pages']), 'The result is supposed to contain two versions for this page in workspace 91');
+        $this->assertEquals(4, count($result['pages']), 'The result is supposed to contain two versions for this page in workspace 91');
     }
 
     /**
@@ -140,8 +140,8 @@ class WorkspaceServiceTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase
         // Test if the placeholder can be found when we ask using recursion (same result)
         $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
         $result = $service->selectVersionsInWorkspace(91, 0, -99, 2, 99);
-        $this->assertEquals(0, sizeof($result['pages']), 'Changes should not show up in this branch of the tree within workspace 91');
-        $this->assertEquals(0, sizeof($result['tt_content']), 'Changes should not show up in this branch of the tree within workspace 91');
+        $this->assertEquals(0, count($result['pages']), 'Changes should not show up in this branch of the tree within workspace 91');
+        $this->assertEquals(0, count($result['tt_content']), 'Changes should not show up in this branch of the tree within workspace 91');
     }
 
     /**
@@ -153,11 +153,11 @@ class WorkspaceServiceTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase
         // Test if the placeholder can be found when we ask using recursion (same result)
         $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
         $result = $service->selectVersionsInWorkspace(91, 0, -99, 5, 99);
-        $this->assertEquals(1, sizeof($result['pages']), 'Wrong amount of page versions found within workspace 91');
+        $this->assertEquals(1, count($result['pages']), 'Wrong amount of page versions found within workspace 91');
         $this->assertEquals(103, $result['pages'][0]['uid'], 'Wrong move-to pointer found for page 3 in workspace 91');
         $this->assertEquals(5, $result['pages'][0]['wspid'], 'Wrong workspace-pointer found for page 3 in workspace 91');
         $this->assertEquals(2, $result['pages'][0]['livepid'], 'Wrong live-pointer found for page 3 in workspace 91');
-        $this->assertEquals(1, sizeof($result['tt_content']), 'Wrong amount of tt_content versions found within workspace 91');
+        $this->assertEquals(1, count($result['tt_content']), 'Wrong amount of tt_content versions found within workspace 91');
         $this->assertEquals(106, $result['tt_content'][0]['uid'], 'Wrong move-to pointer found for page 3 in workspace 91');
         $this->assertEquals(7, $result['tt_content'][0]['wspid'], 'Wrong workspace-pointer found for page 3 in workspace 91');
         $this->assertEquals(2, $result['tt_content'][0]['livepid'], 'Wrong live-pointer found for page 3 in workspace 91');
@@ -172,8 +172,8 @@ class WorkspaceServiceTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase
         // Test if the placeholder can be found when we ask using recursion (same result)
         $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
         $result = $service->selectVersionsInWorkspace(91, 0, -99, 3, 99);
-        $this->assertEquals(1, sizeof($result), 'Wrong amount of versions found within workspace 91');
-        $this->assertEquals(1, sizeof($result['pages']), 'Wrong amount of page versions found within workspace 91');
+        $this->assertEquals(1, count($result), 'Wrong amount of versions found within workspace 91');
+        $this->assertEquals(1, count($result['pages']), 'Wrong amount of page versions found within workspace 91');
         $this->assertEquals(103, $result['pages'][0]['uid'], 'Wrong move-to pointer found for page 3 in workspace 91');
     }
 }