[TASK] Update php-cs-fixer to 2.5.0 91/53791/6
authorWouter Wolters <typo3@wouterwolters.nl>
Wed, 23 Aug 2017 16:45:54 +0000 (18:45 +0200)
committerBenni Mack <benni@typo3.org>
Wed, 23 Aug 2017 18:14:20 +0000 (20:14 +0200)
Add 2 new rules

* no_superfluous_elseif
* no_useless_else

Both rules only apply if the if-statement contains a return. If this
is the case the obsolete else/elseif part is dropped.

Resolves: #82183
Releases: master,8.7
Change-Id: I94dfa6b5b96cbc3e350bd778f1796dda1a4d955a
Reviewed-on: https://review.typo3.org/53791
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
195 files changed:
Build/.php_cs
composer.lock
typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php
typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php
typo3/sysext/backend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/File/FileController.php
typo3/sysext/backend/Classes/Controller/LoginController.php
typo3/sysext/backend/Classes/Controller/NewRecordController.php
typo3/sysext/backend/Classes/Controller/Page/NewMultiplePagesController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Domain/Repository/Module/BackendModuleRepository.php
typo3/sysext/backend/Classes/Form/Container/PaletteAndSingleContainer.php
typo3/sysext/backend/Classes/Form/FieldWizard/OtherLanguageContent.php
typo3/sysext/backend/Classes/Form/FieldWizard/SelectIcons.php
typo3/sysext/backend/Classes/Form/FormDataProvider/DatabaseRowDateTimeFields.php
typo3/sysext/backend/Classes/Form/FormDataProvider/EvaluateDisplayConditions.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaColumnsProcessFieldLabels.php
typo3/sysext/backend/Classes/Form/InlineStackProcessor.php
typo3/sysext/backend/Classes/Form/Wizard/ImageManipulationWizard.php
typo3/sysext/backend/Classes/RecordList/AbstractRecordList.php
typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php
typo3/sysext/backend/Classes/Tree/SortedTreeNodeCollection.php
typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
typo3/sysext/backend/Classes/Tree/View/ContentLayoutPagePositionMap.php
typo3/sysext/backend/Classes/Tree/View/ElementBrowserFolderTreeView.php
typo3/sysext/backend/Classes/Tree/View/ElementBrowserPageTreeView.php
typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/View/BackendLayoutView.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/backend/Classes/View/PageTreeView.php
typo3/sysext/belog/Classes/ViewHelpers/ErrorIconViewHelper.php
typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Cache/Backend/ApcBackend.php
typo3/sysext/core/Classes/Cache/Backend/ApcuBackend.php
typo3/sysext/core/Classes/Cache/Backend/FileBackend.php
typo3/sysext/core/Classes/Cache/Backend/MemcachedBackend.php
typo3/sysext/core/Classes/Cache/Backend/TransientMemoryBackend.php
typo3/sysext/core/Classes/Cache/Backend/WincacheBackend.php
typo3/sysext/core/Classes/Cache/Frontend/VariableFrontend.php
typo3/sysext/core/Classes/Charset/CharsetConverter.php
typo3/sysext/core/Classes/Configuration/Loader/YamlFileLoader.php
typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php
typo3/sysext/core/Classes/Controller/FileDumpController.php
typo3/sysext/core/Classes/Core/ClassLoadingInformation.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/DataHandling/Localization/DataMapItem.php
typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php
typo3/sysext/core/Classes/Database/Query/QueryHelper.php
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Classes/Database/Schema/ConnectionMigrator.php
typo3/sysext/core/Classes/Error/ErrorHandler.php
typo3/sysext/core/Classes/Error/ProductionExceptionHandler.php
typo3/sysext/core/Classes/ExtDirect/ExtDirectApi.php
typo3/sysext/core/Classes/Http/Message.php
typo3/sysext/core/Classes/Http/ServerRequest.php
typo3/sysext/core/Classes/Http/ServerRequestFactory.php
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
typo3/sysext/core/Classes/Imaging/IconRegistry.php
typo3/sysext/core/Classes/Imaging/ImageManipulation/Area.php
typo3/sysext/core/Classes/Imaging/ImageManipulation/CropVariantCollection.php
typo3/sysext/core/Classes/Integrity/DatabaseIntegrityCheck.php
typo3/sysext/core/Classes/LinkHandling/LinkService.php
typo3/sysext/core/Classes/Localization/LanguageService.php
typo3/sysext/core/Classes/Localization/LanguageStore.php
typo3/sysext/core/Classes/Mail/Rfc822AddressesParser.php
typo3/sysext/core/Classes/Migrations/TcaMigration.php
typo3/sysext/core/Classes/Package/PackageManager.php
typo3/sysext/core/Classes/Resource/AbstractFile.php
typo3/sysext/core/Classes/Resource/Collection/FileCollectionRegistry.php
typo3/sysext/core/Classes/Resource/Driver/DriverRegistry.php
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php
typo3/sysext/core/Classes/Resource/File.php
typo3/sysext/core/Classes/Resource/Filter/FileNameFilter.php
typo3/sysext/core/Classes/Resource/Index/ExtractorRegistry.php
typo3/sysext/core/Classes/Resource/ProcessedFile.php
typo3/sysext/core/Classes/Resource/Processing/LocalImageProcessor.php
typo3/sysext/core/Classes/Resource/Rendering/RendererRegistry.php
typo3/sysext/core/Classes/Resource/ResourceFactory.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Service/DependencyOrderingService.php
typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php
typo3/sysext/core/Classes/TypoScript/TemplateService.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Classes/Utility/MailUtility.php
typo3/sysext/core/Classes/Utility/MathUtility.php
typo3/sysext/core/Classes/Utility/RootlineUtility.php
typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/HookTest.php
typo3/sysext/core/Tests/Unit/Configuration/FlexForm/Fixtures/DataStructureParsePreProcessHookReturnString.php
typo3/sysext/core/Tests/Unit/Resource/Driver/Fixtures/LocalDriverFilenameFilter.php
typo3/sysext/documentation/Classes/Service/DocumentationService.php
typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php
typo3/sysext/extbase/Classes/Error/Message.php
typo3/sysext/extbase/Classes/Mvc/Controller/Argument.php
typo3/sysext/extbase/Classes/Mvc/View/JsonView.php
typo3/sysext/extbase/Classes/Mvc/Web/Request.php
typo3/sysext/extbase/Classes/Mvc/Web/RequestBuilder.php
typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php
typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php
typo3/sysext/extbase/Classes/Persistence/Generic/LazyLoadingProxy.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php
typo3/sysext/extbase/Classes/Persistence/Generic/PersistenceManager.php
typo3/sysext/extbase/Classes/Persistence/Generic/Query.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php
typo3/sysext/extbase/Classes/Persistence/Repository.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/Property/TypeConverter/ObjectConverter.php
typo3/sysext/extbase/Classes/Reflection/ObjectAccess.php
typo3/sysext/extbase/Classes/Reflection/ReflectionService.php
typo3/sysext/extbase/Classes/Service/ImageService.php
typo3/sysext/extbase/Classes/SignalSlot/Dispatcher.php
typo3/sysext/extbase/Classes/Utility/DebuggerUtility.php
typo3/sysext/extbase/Classes/Utility/LocalizationUtility.php
typo3/sysext/extbase/Classes/Utility/TypeHandlingUtility.php
typo3/sysext/extbase/Classes/Validation/Validator/CollectionValidator.php
typo3/sysext/extbase/Classes/Validation/Validator/GenericObjectValidator.php
typo3/sysext/extbase/Tests/Unit/Property/TypeConverter/PersistentObjectConverterTest.php
typo3/sysext/extensionmanager/Classes/Utility/DependencyUtility.php
typo3/sysext/extensionmanager/Classes/Utility/InstallUtility.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/DownloadExtensionViewHelper.php
typo3/sysext/extensionmanager/Classes/ViewHelpers/InstallationStateCssClassViewHelper.php
typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractConditionViewHelper.php
typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfAuthenticatedViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfHasRoleViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/Select/OptionViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/MediaViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Security/IfAuthenticatedViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Security/IfHasRoleViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Uri/EmailViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/PaginateController.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/UriViewHelper.php
typo3/sysext/form/Classes/Domain/Model/FormDefinition.php
typo3/sysext/form/Classes/Domain/Model/Renderable/AbstractRenderable.php
typo3/sysext/form/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php
typo3/sysext/form/Classes/ViewHelpers/RenderAllFormValuesViewHelper.php
typo3/sysext/frontend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/Menu/TextMenuContentObject.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Page/ExternalPageUrlHandler.php
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php
typo3/sysext/frontend/Classes/Resource/FileCollector.php
typo3/sysext/frontend/Classes/Typolink/AbstractTypolinkBuilder.php
typo3/sysext/impexp/Classes/Import.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
typo3/sysext/indexed_search/Classes/Indexer.php
typo3/sysext/indexed_search/Classes/Lexer.php
typo3/sysext/indexed_search/Classes/Utility/DoubleMetaPhoneUtility.php
typo3/sysext/install/Classes/Controller/Action/Ajax/ExtensionCompatibilityTester.php
typo3/sysext/install/Classes/Controller/Action/Step/EnvironmentAndFolders.php
typo3/sysext/install/Classes/FolderStructure/AbstractNode.php
typo3/sysext/install/Classes/Service/EnableFileService.php
typo3/sysext/install/Classes/Service/SessionService.php
typo3/sysext/install/Classes/SystemEnvironment/Check.php
typo3/sysext/install/Classes/Updates/AbstractUpdate.php
typo3/sysext/install/Classes/Updates/DatabaseRowsUpdateWizard.php
typo3/sysext/lang/Classes/Service/TerService.php
typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php
typo3/sysext/linkvalidator/Classes/Task/ValidatorTaskAdditionalFieldProvider.php
typo3/sysext/recordlist/Classes/LinkHandler/FolderLinkHandler.php
typo3/sysext/recordlist/Classes/LinkHandler/PageLinkHandler.php
typo3/sysext/recycler/Classes/Task/CleanerFieldProvider.php
typo3/sysext/saltedpasswords/Classes/Task/BulkUpdateTask.php
typo3/sysext/saltedpasswords/Classes/Utility/SaltedPasswordsUtility.php
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/scheduler/Classes/Scheduler.php
typo3/sysext/scheduler/Classes/Task/FileStorageExtractionAdditionalFieldProvider.php
typo3/sysext/scheduler/Classes/Task/FileStorageIndexingAdditionalFieldProvider.php
typo3/sysext/sys_action/Classes/ActionTask.php
typo3/sysext/version/Classes/Dependency/ElementEntity.php
typo3/sysext/viewpage/Classes/Controller/ViewModuleController.php
typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php
typo3/sysext/workspaces/Classes/Domain/Record/StageRecord.php
typo3/sysext/workspaces/Classes/Hook/PreviewHook.php
typo3/sysext/workspaces/Classes/Service/GridDataService.php
typo3/sysext/workspaces/Classes/Service/IntegrityService.php
typo3/sysext/workspaces/Classes/Service/StagesService.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php

index dc5933d..3c75657 100644 (file)
@@ -78,6 +78,8 @@ return PhpCsFixer\Config::create()
         'no_short_bool_cast' => true,
         'no_unneeded_control_parentheses' => true,
         'phpdoc_no_empty_return' => true,
         'no_short_bool_cast' => true,
         'no_unneeded_control_parentheses' => true,
         'phpdoc_no_empty_return' => true,
-        'phpdoc_trim' => true
+        'phpdoc_trim' => true,
+        'no_superfluous_elseif' => true,
+        'no_useless_else' => true,
     ])
     ->setFinder($finder);
     ])
     ->setFinder($finder);
index 2644475..93bfa69 100644 (file)
         },
         {
             "name": "friendsofphp/php-cs-fixer",
         },
         {
             "name": "friendsofphp/php-cs-fixer",
-            "version": "v2.4.1",
+            "version": "v2.5.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
             "source": {
                 "type": "git",
                 "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
-                "reference": "b4983586c8e7b1f99ec05dd1e75c8b673315da70"
+                "reference": "63aad575ec2a29d50eb6c3b5cbc17430b28895b2"
             },
             "dist": {
                 "type": "zip",
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/b4983586c8e7b1f99ec05dd1e75c8b673315da70",
-                "reference": "b4983586c8e7b1f99ec05dd1e75c8b673315da70",
+                "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/63aad575ec2a29d50eb6c3b5cbc17430b28895b2",
+                "reference": "63aad575ec2a29d50eb6c3b5cbc17430b28895b2",
                 "shasum": ""
             },
             "require": {
                 "shasum": ""
             },
             "require": {
                 "gecko-packages/gecko-php-unit": "^2.0",
                 "php": "^5.6 || >=7.0 <7.2",
                 "sebastian/diff": "^1.4",
                 "gecko-packages/gecko-php-unit": "^2.0",
                 "php": "^5.6 || >=7.0 <7.2",
                 "sebastian/diff": "^1.4",
-                "symfony/console": "^3.0",
+                "symfony/console": "^3.2",
                 "symfony/event-dispatcher": "^3.0",
                 "symfony/filesystem": "^3.0",
                 "symfony/finder": "^3.0",
                 "symfony/event-dispatcher": "^3.0",
                 "symfony/filesystem": "^3.0",
                 "symfony/finder": "^3.0",
             "require-dev": {
                 "johnkary/phpunit-speedtrap": "^1.1",
                 "justinrainbow/json-schema": "^5.0",
             "require-dev": {
                 "johnkary/phpunit-speedtrap": "^1.1",
                 "justinrainbow/json-schema": "^5.0",
+                "php-cs-fixer/accessible-object": "^1.0",
                 "phpunit/phpunit": "^4.8.35 || ^5.4.3",
                 "satooshi/php-coveralls": "^1.0",
                 "symfony/phpunit-bridge": "^3.2.2"
                 "phpunit/phpunit": "^4.8.35 || ^5.4.3",
                 "satooshi/php-coveralls": "^1.0",
                 "symfony/phpunit-bridge": "^3.2.2"
                 "php-cs-fixer"
             ],
             "type": "application",
                 "php-cs-fixer"
             ],
             "type": "application",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.4-dev"
-                }
-            },
             "autoload": {
                 "psr-4": {
                     "PhpCsFixer\\": "src/"
             "autoload": {
                 "psr-4": {
                     "PhpCsFixer\\": "src/"
                 }
             ],
             "description": "A tool to automatically fix PHP code style",
                 }
             ],
             "description": "A tool to automatically fix PHP code style",
-            "time": "2017-08-22T14:11:01+00:00"
+            "time": "2017-08-22T14:15:09+00:00"
         },
         {
             "name": "gecko-packages/gecko-php-unit",
         },
         {
             "name": "gecko-packages/gecko-php-unit",
index 5a46e36..d196b4d 100644 (file)
@@ -114,16 +114,15 @@ class ClearCacheToolbarItem implements ToolbarItemInterface
     {
         if ($this->hasDropDown()) {
             return $this->getFluidTemplateObject('ClearCacheToolbarItem.html')->render();
     {
         if ($this->hasDropDown()) {
             return $this->getFluidTemplateObject('ClearCacheToolbarItem.html')->render();
-        } else {
-            $view = $this->getFluidTemplateObject('ClearCacheToolbarItemSingle.html');
-            $cacheAction = end($this->cacheActions);
-            $view->assignMultiple([
+        }
+        $view = $this->getFluidTemplateObject('ClearCacheToolbarItemSingle.html');
+        $cacheAction = end($this->cacheActions);
+        $view->assignMultiple([
                 'link'  => $cacheAction['href'],
                 'title' => $cacheAction['title'],
                 'iconIdentifier'  => $cacheAction['iconIdentifier'],
             ]);
                 'link'  => $cacheAction['href'],
                 'title' => $cacheAction['title'],
                 'iconIdentifier'  => $cacheAction['iconIdentifier'],
             ]);
-            return $view->render();
-        }
+        return $view->render();
     }
 
     /**
     }
 
     /**
index 3ffc2e5..c7f8b60 100644 (file)
@@ -655,9 +655,8 @@ class ShortcutToolbarItem implements ToolbarItemInterface
 
         if ($affectedRows === 1) {
             return 'success';
 
         if ($affectedRows === 1) {
             return 'success';
-        } else {
-            return 'failed';
         }
         }
+        return 'failed';
     }
 
     /**
     }
 
     /**
index 834d2b0..17a3661 100644 (file)
@@ -47,8 +47,8 @@ class ConditionMatcher extends AbstractConditionMatcher
         $result = $this->evaluateConditionCommon($key, $value);
         if (is_bool($result)) {
             return $result;
         $result = $this->evaluateConditionCommon($key, $value);
         if (is_bool($result)) {
             return $result;
-        } else {
-            switch ($key) {
+        }
+        switch ($key) {
                 case 'usergroup':
                     $groupList = $this->getGroupList();
                     $values = GeneralUtility::trimExplode(',', $value, true);
                 case 'usergroup':
                     $groupList = $this->getGroupList();
                     $values = GeneralUtility::trimExplode(',', $value, true);
@@ -95,7 +95,7 @@ class ConditionMatcher extends AbstractConditionMatcher
                         return $conditionResult;
                     }
             }
                         return $conditionResult;
                     }
             }
-        }
+
         return false;
     }
 
         return false;
     }
 
index 1c5bcf4..2c5200d 100644 (file)
@@ -775,9 +775,8 @@ class BackendController
                                        // start in module:
                                top.startInModule = [' . GeneralUtility::quoteJSvalue($startModule) . ', ' . GeneralUtility::quoteJSvalue($moduleParameters) . '];
                        ';
                                        // start in module:
                                top.startInModule = [' . GeneralUtility::quoteJSvalue($startModule) . ', ' . GeneralUtility::quoteJSvalue($moduleParameters) . '];
                        ';
-        } else {
-            return '';
         }
         }
+        return '';
     }
 
     /**
     }
 
     /**
index c977cdd..a0b1b9c 100644 (file)
@@ -508,12 +508,11 @@ class NewContentElementController extends AbstractModule
                             // Remove element all together:
                             unset($wizardItems[$key]);
                             break;
                             // Remove element all together:
                             unset($wizardItems[$key]);
                             break;
-                        } else {
-                            // Add the parameter:
-                            $wizardItems[$key]['params'] .= '&defVals[tt_content][' . $fN . ']=' . rawurlencode($this->getLanguageService()->sL($fV));
-                            $tmp = explode('_', $key);
-                            $headersUsed[$tmp[0]] = $tmp[0];
                         }
                         }
+                        // Add the parameter:
+                        $wizardItems[$key]['params'] .= '&defVals[tt_content][' . $fN . ']=' . rawurlencode($this->getLanguageService()->sL($fV));
+                        $tmp = explode('_', $key);
+                        $headersUsed[$tmp[0]] = $tmp[0];
                     }
                 }
             }
                     }
                 }
             }
index be023af..952a8f5 100644 (file)
@@ -1804,30 +1804,26 @@ class EditDocumentController extends AbstractModule
                         // that is handled inside DataHandler then and in the interface it would clearly be an error of
                         // links if the user accesses such a scenario)
                         return $reqRecord;
                         // that is handled inside DataHandler then and in the interface it would clearly be an error of
                         // links if the user accesses such a scenario)
                         return $reqRecord;
-                    } else {
-                        // The input record was online and an offline version must be found or made:
-                        // Look for version of this workspace:
-                        $versionRec = BackendUtility::getWorkspaceVersionOfRecord(
+                    }
+                    // The input record was online and an offline version must be found or made:
+                    // Look for version of this workspace:
+                    $versionRec = BackendUtility::getWorkspaceVersionOfRecord(
                             $this->getBackendUser()->workspace,
                             $table,
                             $reqRecord['uid'],
                             'uid,pid,t3ver_oid'
                         );
                             $this->getBackendUser()->workspace,
                             $table,
                             $reqRecord['uid'],
                             'uid,pid,t3ver_oid'
                         );
-                        return is_array($versionRec) ? $versionRec : $reqRecord;
-                    }
-                } else {
-                    // This means that editing cannot occur on this record because it was not supporting versioning
-                    // which is required inside an offline workspace.
-                    return false;
+                    return is_array($versionRec) ? $versionRec : $reqRecord;
                 }
                 }
-            } else {
-                // In ONLINE workspace, just return the originally requested record:
-                return $reqRecord;
+                // This means that editing cannot occur on this record because it was not supporting versioning
+                // which is required inside an offline workspace.
+                return false;
             }
             }
-        } else {
-            // Return FALSE because the table/uid was not found anyway.
-            return false;
+            // In ONLINE workspace, just return the originally requested record:
+            return $reqRecord;
         }
         }
+        // Return FALSE because the table/uid was not found anyway.
+        return false;
     }
 
     /**
     }
 
     /**
index e61d290..1c862ba 100644 (file)
@@ -192,10 +192,9 @@ class FileController
             return $response
                     ->withHeader('Location', GeneralUtility::locationHeaderUrl($this->redirect))
                     ->withStatus(303);
             return $response
                     ->withHeader('Location', GeneralUtility::locationHeaderUrl($this->redirect))
                     ->withStatus(303);
-        } else {
-            // empty response
-            return $response;
         }
         }
+        // empty response
+        return $response;
     }
 
     /**
     }
 
     /**
index ba3b420..e080169 100644 (file)
@@ -273,10 +273,9 @@ class LoginController
                  */
                 throw new \RuntimeException('Login-error: Yeah, that\'s a classic. No cookies, no TYPO3. ' .
                     'Please accept cookies from TYPO3 - otherwise you\'ll not be able to use the system.', 1294586846);
                  */
                 throw new \RuntimeException('Login-error: Yeah, that\'s a classic. No cookies, no TYPO3. ' .
                     'Please accept cookies from TYPO3 - otherwise you\'ll not be able to use the system.', 1294586846);
-            } else {
-                // try it once again - that might be needed for auto login
-                $this->redirectToURL = 'index.php?commandLI=setCookie';
             }
             }
+            // try it once again - that might be needed for auto login
+            $this->redirectToURL = 'index.php?commandLI=setCookie';
         }
         $redirectToUrl = (string)$this->getBackendUserAuthentication()->getTSConfigVal('auth.BE.redirectToURL');
         if (empty($redirectToUrl)) {
         }
         $redirectToUrl = (string)$this->getBackendUserAuthentication()->getTSConfigVal('auth.BE.redirectToURL');
         if (empty($redirectToUrl)) {
index 56e7044..dd18ae0 100644 (file)
@@ -622,10 +622,9 @@ class NewRecordController extends AbstractModule
                 $ret = strnatcasecmp($this->tRows[$a]['title'], $this->tRows[$b]['title']);
             }
             return $ret;
                 $ret = strnatcasecmp($this->tRows[$a]['title'], $this->tRows[$b]['title']);
             }
             return $ret;
-        } else {
-            // Return alphabetic order
-            return strnatcasecmp($this->tRows[$a]['title'], $this->tRows[$b]['title']);
         }
         }
+        // Return alphabetic order
+        return strnatcasecmp($this->tRows[$a]['title'], $this->tRows[$b]['title']);
     }
 
     /**
     }
 
     /**
index 8fcb109..fc5345a 100644 (file)
@@ -164,19 +164,18 @@ class NewMultiplePagesController
         foreach ($newPagesData as $identifier => $data) {
             if (!trim($data['title'])) {
                 continue;
         foreach ($newPagesData as $identifier => $data) {
             if (!trim($data['title'])) {
                 continue;
+            }
+            $commandArray['pages'][$identifier]['hidden'] = $hidePages;
+            $commandArray['pages'][$identifier]['nav_hide'] = $hidePagesInMenu;
+            $commandArray['pages'][$identifier]['title'] = $data['title'];
+            $commandArray['pages'][$identifier]['doktype'] = $data['doktype'];
+            if ($firstRecord) {
+                $firstRecord = false;
+                $commandArray['pages'][$identifier]['pid'] = $firstPid;
             } else {
             } else {
-                $commandArray['pages'][$identifier]['hidden'] = $hidePages;
-                $commandArray['pages'][$identifier]['nav_hide'] = $hidePagesInMenu;
-                $commandArray['pages'][$identifier]['title'] = $data['title'];
-                $commandArray['pages'][$identifier]['doktype'] = $data['doktype'];
-                if ($firstRecord) {
-                    $firstRecord = false;
-                    $commandArray['pages'][$identifier]['pid'] = $firstPid;
-                } else {
-                    $commandArray['pages'][$identifier]['pid'] = '-' . $previousIdentifier;
-                }
-                $previousIdentifier = $identifier;
+                $commandArray['pages'][$identifier]['pid'] = '-' . $previousIdentifier;
             }
             }
+            $previousIdentifier = $identifier;
         }
 
         if (!empty($commandArray)) {
         }
 
         if (!empty($commandArray)) {
index 4e05998..fdf5f59 100644 (file)
@@ -653,9 +653,8 @@ class PageLayoutController
                 ->execute()
                 ->fetch();
             return $overlayRecord['title'];
                 ->execute()
                 ->fetch();
             return $overlayRecord['title'];
-        } else {
-            return $this->pageinfo['title'];
         }
         }
+        return $this->pageinfo['title'];
     }
 
     /**
     }
 
     /**
index d89d444..776868b 100644 (file)
@@ -356,8 +356,7 @@ class BackendModuleRepository implements \TYPO3\CMS\Core\SingletonInterface
         if ($iconRegistry->isRegistered($iconIdentifier)) {
             $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
             return $iconFactory->getIcon($iconIdentifier)->render();
         if ($iconRegistry->isRegistered($iconIdentifier)) {
             $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
             return $iconFactory->getIcon($iconIdentifier)->render();
-        } else {
-            return '';
         }
         }
+        return '';
     }
 }
     }
 }
index 3e1e90d..2d05b34 100644 (file)
@@ -232,9 +232,8 @@ class PaletteAndSingleContainer extends AbstractContainer
 
         if ($foundRealElement) {
             return $resultStructure;
 
         if ($foundRealElement) {
             return $resultStructure;
-        } else {
-            return [];
         }
         }
+        return [];
     }
 
     /**
     }
 
     /**
index 68a5a72..ae8c471 100644 (file)
@@ -146,8 +146,7 @@ class OtherLanguageContent extends AbstractNode
                     '</span>';
             }
             return implode('<br />', $imgs);
                     '</span>';
             }
             return implode('<br />', $imgs);
-        } else {
-            return nl2br(htmlspecialchars($value));
         }
         }
+        return nl2br(htmlspecialchars($value));
     }
 }
     }
 }
index 263c33b..48adc32 100644 (file)
@@ -40,17 +40,16 @@ class SelectIcons extends AbstractNode
         foreach ($selectItems as $item) {
             if ($item[1] === '--div--') {
                 continue;
         foreach ($selectItems as $item) {
             if ($item[1] === '--div--') {
                 continue;
-            } else {
-                $icon = !empty($item[2]) ? FormEngineUtility::getIconHtml($item[2], $item[0], $item[0]) : '';
-                if ($icon) {
-                    $selectIcons[] = [
+            }
+            $icon = !empty($item[2]) ? FormEngineUtility::getIconHtml($item[2], $item[0], $item[0]) : '';
+            if ($icon) {
+                $selectIcons[] = [
                         'title' => $item[0],
                         'icon' => $icon,
                         'index' => $selectItemCounter,
                     ];
                         'title' => $item[0],
                         'icon' => $icon,
                         'index' => $selectItemCounter,
                     ];
-                }
-                $selectItemCounter++;
             }
             }
+            $selectItemCounter++;
         }
 
         $html = [];
         }
 
         $html = [];
index 6645476..67d3e1b 100644 (file)
@@ -45,10 +45,9 @@ class DatabaseRowDateTimeFields implements FormDataProviderInterface
                 } else {
                     $result['databaseRow'][$column] = null;
                 }
                 } else {
                     $result['databaseRow'][$column] = null;
                 }
-            } else {
-                // its a UNIX timestamp! We do not modify this here, as it will only be treated as a datetime because
-                // of eval being set to "date" or "datetime". This is handled in InputTextElement then.
             }
             }
+            // its a UNIX timestamp! We do not modify this here, as it will only be treated as a datetime because
+                // of eval being set to "date" or "datetime". This is handled in InputTextElement then.
         }
         return $result;
     }
         }
         return $result;
     }
index ebfc873..362791e 100644 (file)
@@ -874,9 +874,8 @@ class EvaluateDisplayConditions implements FormDataProviderInterface
     {
         if ($condition['isNew']) {
             return !((int)$condition['uid'] > 0);
     {
         if ($condition['isNew']) {
             return !((int)$condition['uid'] > 0);
-        } else {
-            return (int)$condition['uid'] > 0;
         }
         }
+        return (int)$condition['uid'] > 0;
     }
 
     /**
     }
 
     /**
index e0a9690..ac4b044 100644 (file)
@@ -68,7 +68,8 @@ class TcaColumnsProcessFieldLabels implements FormDataProviderInterface
             if ($aShowItemFieldArray['fieldName'] === '--div--') {
                 // tabs are not of interest here
                 continue;
             if ($aShowItemFieldArray['fieldName'] === '--div--') {
                 // tabs are not of interest here
                 continue;
-            } elseif ($aShowItemFieldArray['fieldName'] === '--palette--') {
+            }
+            if ($aShowItemFieldArray['fieldName'] === '--palette--') {
                 // showitem references to a palette field. unpack the palette and process
                 // label overrides that may be in there.
                 if (!isset($result['processedTca']['palettes'][$aShowItemFieldArray['paletteName']]['showitem'])) {
                 // showitem references to a palette field. unpack the palette and process
                 // label overrides that may be in there.
                 if (!isset($result['processedTca']['palettes'][$aShowItemFieldArray['paletteName']]['showitem'])) {
index e0e5b07..790f93e 100644 (file)
@@ -193,9 +193,8 @@ class InlineStackProcessor
 
         if ($level !== false) {
             return $this->inlineStructure['stable'][$level];
 
         if ($level !== false) {
             return $this->inlineStructure['stable'][$level];
-        } else {
-            return false;
         }
         }
+        return false;
     }
 
     /**
     }
 
     /**
index 112d956..0c0d150 100644 (file)
@@ -74,9 +74,8 @@ class ImageManipulationWizard
             $response->getBody()->write($content);
 
             return $response;
             $response->getBody()->write($content);
 
             return $response;
-        } else {
-            return $response->withStatus(403);
         }
         }
+        return $response->withStatus(403);
     }
 
     /**
     }
 
     /**
index 91a86b9..0f6a912 100644 (file)
@@ -326,16 +326,15 @@ abstract class AbstractRecordList
                 $code = $this->addElement(1, '', $theData, 'class="fwd_rwd_nav"');
             }
             return [1, $code];
                 $code = $this->addElement(1, '', $theData, 'class="fwd_rwd_nav"');
             }
             return [1, $code];
-        } else {
-            if ($this->eCounter == $this->firstElementNumber + $this->iLimit) {
-                //     Forward
-                $theData = [];
-                $titleCol = $this->fieldArray[0];
-                $theData[$titleCol] = $this->fwd_rwd_HTML('rwd', $this->eCounter, $table);
-                $code = $this->addElement(1, '', $theData, 'class="fwd_rwd_nav"');
-            }
-            return [0, $code];
         }
         }
+        if ($this->eCounter == $this->firstElementNumber + $this->iLimit) {
+            //         Forward
+            $theData = [];
+            $titleCol = $this->fieldArray[0];
+            $theData[$titleCol] = $this->fwd_rwd_HTML('rwd', $this->eCounter, $table);
+            $code = $this->addElement(1, '', $theData, 'class="fwd_rwd_nav"');
+        }
+        return [0, $code];
     }
 
     /**
     }
 
     /**
index 21d7185..78aebab 100644 (file)
@@ -218,7 +218,8 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider
         $records = $this->getSubpages(-1, $searchFilter);
         if (!is_array($records) || empty($records)) {
             return $nodeCollection;
         $records = $this->getSubpages(-1, $searchFilter);
         if (!is_array($records) || empty($records)) {
             return $nodeCollection;
-        } elseif (count($records) > 500) {
+        }
+        if (count($records) > 500) {
             return $nodeCollection;
         }
         // check no temporary mountpoint is used
             return $nodeCollection;
         }
         // check no temporary mountpoint is used
index 8f46e58..83bf446 100644 (file)
@@ -58,20 +58,19 @@ class SortedTreeNodeCollection extends \TYPO3\CMS\Backend\Tree\TreeNodeCollectio
             $divider = ceil(($end - $start) / 2);
             if ($this->offsetGet($divider)->equals($node)) {
                 return $divider;
             $divider = ceil(($end - $start) / 2);
             if ($this->offsetGet($divider)->equals($node)) {
                 return $divider;
-            } elseif ($this->offsetGet($divider)->compareTo($node) > 0) {
-                return $this->binarySearch($node, $start, $divider - 1);
-            } else {
-                return $this->binarySearch($node, $divider + 1, $end);
             }
             }
-        } else {
-            if ($this->offsetGet($start)->equals($node)) {
-                return $start;
-            } elseif ($this->offsetGet($end)->equals($node)) {
-                return $end;
-            } else {
-                return -1;
+            if ($this->offsetGet($divider)->compareTo($node) > 0) {
+                return $this->binarySearch($node, $start, $divider - 1);
             }
             }
+            return $this->binarySearch($node, $divider + 1, $end);
+        }
+        if ($this->offsetGet($start)->equals($node)) {
+            return $start;
+        }
+        if ($this->offsetGet($end)->equals($node)) {
+            return $end;
         }
         }
+        return -1;
     }
 
     /**
     }
 
     /**
index bb58c70..2564e31 100644 (file)
@@ -510,9 +510,8 @@ abstract class AbstractTreeView
             $cmd = $this->bank . '_' . ($isOpen ? '0_' : '1_') . $row['uid'] . '_' . $this->treeName;
             $bMark = $this->bank . '_' . $row['uid'];
             return $this->PM_ATagWrap('', $cmd, $bMark, $isOpen);
             $cmd = $this->bank . '_' . ($isOpen ? '0_' : '1_') . $row['uid'] . '_' . $this->treeName;
             $bMark = $this->bank . '_' . $row['uid'];
             return $this->PM_ATagWrap('', $cmd, $bMark, $isOpen);
-        } else {
-            return '';
         }
         }
+        return '';
     }
 
     /**
     }
 
     /**
@@ -532,9 +531,8 @@ abstract class AbstractTreeView
             $name = $bMark ? ' name="' . $bMark . '"' : '';
             $aUrl = $this->getThisScript() . 'PM=' . $cmd . $anchor;
             return '<a class="list-tree-control ' . ($isOpen ? 'list-tree-control-open' : 'list-tree-control-closed') . '" href="' . htmlspecialchars($aUrl) . '"' . $name . '><i class="fa"></i></a>';
             $name = $bMark ? ' name="' . $bMark . '"' : '';
             $aUrl = $this->getThisScript() . 'PM=' . $cmd . $anchor;
             return '<a class="list-tree-control ' . ($isOpen ? 'list-tree-control-open' : 'list-tree-control-closed') . '" href="' . htmlspecialchars($aUrl) . '"' . $name . '><i class="fa"></i></a>';
-        } else {
-            return $icon;
         }
         }
+        return $icon;
     }
 
     /**
     }
 
     /**
@@ -846,13 +844,13 @@ abstract class AbstractTreeView
         if (is_array($this->data)) {
             $res = $this->getDataInit($uid);
             return $this->getDataCount($res);
         if (is_array($this->data)) {
             $res = $this->getDataInit($uid);
             return $this->getDataCount($res);
-        } else {
-            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($this->table);
-            $queryBuilder->getRestrictions()
+        }
+        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($this->table);
+        $queryBuilder->getRestrictions()
                 ->removeAll()
                 ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
                 ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
                 ->removeAll()
                 ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
                 ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
-            $count = $queryBuilder
+        $count = $queryBuilder
                 ->count('uid')
                 ->from($this->table)
                 ->where(
                 ->count('uid')
                 ->from($this->table)
                 ->where(
@@ -865,8 +863,7 @@ abstract class AbstractTreeView
                 ->execute()
                 ->fetchColumn();
 
                 ->execute()
                 ->fetchColumn();
 
-            return (int)$count;
-        }
+        return (int)$count;
     }
 
     /**
     }
 
     /**
@@ -891,9 +888,8 @@ abstract class AbstractTreeView
     {
         if (is_array($this->data)) {
             return $this->dataLookup[$uid];
     {
         if (is_array($this->data)) {
             return $this->dataLookup[$uid];
-        } else {
-            return BackendUtility::getRecordWSOL($this->table, $uid);
         }
         }
+        return BackendUtility::getRecordWSOL($this->table, $uid);
     }
 
     /**
     }
 
     /**
@@ -915,13 +911,13 @@ abstract class AbstractTreeView
                 reset($this->dataLookup[$parentId][$this->subLevelID]);
             }
             return $parentId;
                 reset($this->dataLookup[$parentId][$this->subLevelID]);
             }
             return $parentId;
-        } else {
-            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($this->table);
-            $queryBuilder->getRestrictions()
+        }
+        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($this->table);
+        $queryBuilder->getRestrictions()
                 ->removeAll()
                 ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
                 ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
                 ->removeAll()
                 ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
                 ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));
-            $queryBuilder
+        $queryBuilder
                 ->select(...$this->fieldArray)
                 ->from($this->table)
                 ->where(
                 ->select(...$this->fieldArray)
                 ->from($this->table)
                 ->where(
@@ -932,13 +928,12 @@ abstract class AbstractTreeView
                     QueryHelper::stripLogicalOperatorPrefix($this->clause)
                 );
 
                     QueryHelper::stripLogicalOperatorPrefix($this->clause)
                 );
 
-            foreach (QueryHelper::parseOrderBy($this->orderByFields) as $orderPair) {
-                list($fieldName, $order) = $orderPair;
-                $queryBuilder->addOrderBy($fieldName, $order);
-            }
-
-            return $queryBuilder->execute();
+        foreach (QueryHelper::parseOrderBy($this->orderByFields) as $orderPair) {
+            list($fieldName, $order) = $orderPair;
+            $queryBuilder->addOrderBy($fieldName, $order);
         }
         }
+
+        return $queryBuilder->execute();
     }
 
     /**
     }
 
     /**
@@ -953,9 +948,8 @@ abstract class AbstractTreeView
     {
         if (is_array($this->data)) {
             return count($this->dataLookup[$res][$this->subLevelID]);
     {
         if (is_array($this->data)) {
             return count($this->dataLookup[$res][$this->subLevelID]);
-        } else {
-            return $res->rowCount();
         }
         }
+        return $res->rowCount();
     }
 
     /**
     }
 
     /**
@@ -976,15 +970,14 @@ abstract class AbstractTreeView
                 list(, $row) = each($this->dataLookup[$res][$this->subLevelID]);
             }
             return $row;
                 list(, $row) = each($this->dataLookup[$res][$this->subLevelID]);
             }
             return $row;
-        } else {
-            while ($row = $res->fetch()) {
-                BackendUtility::workspaceOL($this->table, $row, $this->BE_USER->workspace, true);
-                if (is_array($row)) {
-                    break;
-                }
+        }
+        while ($row = $res->fetch()) {
+            BackendUtility::workspaceOL($this->table, $row, $this->BE_USER->workspace, true);
+            if (is_array($row)) {
+                break;
             }
             }
-            return $row;
         }
         }
+        return $row;
     }
 
     /**
     }
 
     /**
index 2c0f246..95b0ca8 100644 (file)
@@ -94,9 +94,8 @@ class ContentLayoutPagePositionMap extends PagePositionMap
             /** @var IconFactory $iconFactory */
             $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
             return $iconFactory->getIcon('status-status-current', Icon::SIZE_SMALL)->render() . $str;
             /** @var IconFactory $iconFactory */
             $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
             return $iconFactory->getIcon('status-status-current', Icon::SIZE_SMALL)->render() . $str;
-        } else {
-            return $str;
         }
         }
+        return $str;
     }
 
     /**
     }
 
     /**
index 37963cd..15392f6 100644 (file)
@@ -84,9 +84,8 @@ class ElementBrowserFolderTreeView extends FolderTreeView
         if ($this->ext_isLinkable($folderObject)) {
             $parameters = GeneralUtility::implodeArrayForUrl('', $this->linkParameterProvider->getUrlParameters(['identifier' => $folderObject->getCombinedIdentifier()]));
             return '<a href="#" onclick="return jumpToUrl(' . htmlspecialchars(GeneralUtility::quoteJSvalue($this->getThisScript() . ltrim($parameters, '&'))) . ');">' . $title . '</a>';
         if ($this->ext_isLinkable($folderObject)) {
             $parameters = GeneralUtility::implodeArrayForUrl('', $this->linkParameterProvider->getUrlParameters(['identifier' => $folderObject->getCombinedIdentifier()]));
             return '<a href="#" onclick="return jumpToUrl(' . htmlspecialchars(GeneralUtility::quoteJSvalue($this->getThisScript() . ltrim($parameters, '&'))) . ');">' . $title . '</a>';
-        } else {
-            return '<span class="text-muted">' . $title . '</span>';
         }
         }
+        return '<span class="text-muted">' . $title . '</span>';
     }
 
     /**
     }
 
     /**
index dc6fe6f..ab6780b 100644 (file)
@@ -76,9 +76,8 @@ class ElementBrowserPageTreeView extends BrowseTreeView
         if ($this->ext_isLinkable($v['doktype'], $v['uid'])) {
             $url = GeneralUtility::makeInstance(LinkService::class)->asString(['type' => LinkService::TYPE_PAGE, 'pageuid' => (int)$v['uid']]);
             return '<span class="list-tree-title"><a href="' . htmlspecialchars($url) . '" class="t3js-pageLink">' . $title . '</a></span>';
         if ($this->ext_isLinkable($v['doktype'], $v['uid'])) {
             $url = GeneralUtility::makeInstance(LinkService::class)->asString(['type' => LinkService::TYPE_PAGE, 'pageuid' => (int)$v['uid']]);
             return '<span class="list-tree-title"><a href="' . htmlspecialchars($url) . '" class="t3js-pageLink">' . $title . '</a></span>';
-        } else {
-            return '<span class="list-tree-title text-muted">' . $title . '</span>';
         }
         }
+        return '<span class="list-tree-title text-muted">' . $title . '</span>';
     }
 
     /**
     }
 
     /**
index c8e272f..b087567 100644 (file)
@@ -146,9 +146,8 @@ class FolderTreeView extends AbstractTreeView
             $scopeHash = GeneralUtility::hmac($scopeData);
             $js = htmlspecialchars('Tree.load(' . GeneralUtility::quoteJSvalue($cmd) . ', ' . (int)$isExpand . ', this, ' . GeneralUtility::quoteJSvalue($scopeData) . ', ' . GeneralUtility::quoteJSvalue($scopeHash) . ');');
             return '<a class="list-tree-control' . (!$isExpand ? ' list-tree-control-open' : ' list-tree-control-closed') . '" onclick="' . $js . '"><i class="fa"></i></a>';
             $scopeHash = GeneralUtility::hmac($scopeData);
             $js = htmlspecialchars('Tree.load(' . GeneralUtility::quoteJSvalue($cmd) . ', ' . (int)$isExpand . ', this, ' . GeneralUtility::quoteJSvalue($scopeData) . ', ' . GeneralUtility::quoteJSvalue($scopeHash) . ');');
             return '<a class="list-tree-control' . (!$isExpand ? ' list-tree-control-open' : ' list-tree-control-closed') . '" onclick="' . $js . '"><i class="fa"></i></a>';
-        } else {
-            return $icon;
         }
         }
+        return $icon;
     }
 
     /**
     }
 
     /**
@@ -644,12 +643,10 @@ class FolderTreeView extends AbstractTreeView
         if ($storageObject) {
             if ($startingPointFolder) {
                 return $this->storageHashNumbers[$storageObject->getUid() . $startingPointFolder->getCombinedIdentifier()];
         if ($storageObject) {
             if ($startingPointFolder) {
                 return $this->storageHashNumbers[$storageObject->getUid() . $startingPointFolder->getCombinedIdentifier()];
-            } else {
-                return $this->storageHashNumbers[$storageObject->getUid()];
             }
             }
-        } else {
-            return null;
+            return $this->storageHashNumbers[$storageObject->getUid()];
         }
         }
+        return null;
     }
 
     /**
     }
 
     /**
index 68055be..103a2fe 100644 (file)
@@ -539,9 +539,8 @@ class BackendUtility
         }
         if ($fullTitleLimit) {
             return [$output, $fullOutput];
         }
         if ($fullTitleLimit) {
             return [$output, $fullOutput];
-        } else {
-            return $output;
         }
         }
+        return $output;
     }
 
     /**
     }
 
     /**
@@ -851,74 +850,74 @@ class BackendUtility
             && isset($pagesTSconfig_cacheReference[$id])
         ) {
             return $combinedTSconfig_cache[$pagesTSconfig_cacheReference[$id]];
             && isset($pagesTSconfig_cacheReference[$id])
         ) {
             return $combinedTSconfig_cache[$pagesTSconfig_cacheReference[$id]];
+        }
+        $TSconfig = [];
+        if (!is_array($rootLine)) {
+            $useCacheForCurrentPageId = true;
+            $rootLine = self::BEgetRootLine($id, '', true);
         } else {
         } else {
-            $TSconfig = [];
-            if (!is_array($rootLine)) {
-                $useCacheForCurrentPageId = true;
-                $rootLine = self::BEgetRootLine($id, '', true);
-            } else {
-                $useCacheForCurrentPageId = false;
-            }
-
-            // Order correctly
-            ksort($rootLine);
-            $TSdataArray = [];
-            // Setting default configuration
-            $TSdataArray['defaultPageTSconfig'] = $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPageTSconfig'];
-            foreach ($rootLine as $k => $v) {
-                if (trim($v['tsconfig_includes'])) {
-                    $includeTsConfigFileList = GeneralUtility::trimExplode(',', $v['tsconfig_includes'], true);
-                    // Traversing list
-                    foreach ($includeTsConfigFileList as $key => $includeTsConfigFile) {
-                        if (strpos($includeTsConfigFile, 'EXT:') === 0) {
-                            list($includeTsConfigFileExtensionKey, $includeTsConfigFilename) = explode(
+            $useCacheForCurrentPageId = false;
+        }
+
+        // Order correctly
+        ksort($rootLine);
+        $TSdataArray = [];
+        // Setting default configuration
+        $TSdataArray['defaultPageTSconfig'] = $GLOBALS['TYPO3_CONF_VARS']['BE']['defaultPageTSconfig'];
+        foreach ($rootLine as $k => $v) {
+            if (trim($v['tsconfig_includes'])) {
+                $includeTsConfigFileList = GeneralUtility::trimExplode(',', $v['tsconfig_includes'], true);
+                // Traversing list
+                foreach ($includeTsConfigFileList as $key => $includeTsConfigFile) {
+                    if (strpos($includeTsConfigFile, 'EXT:') === 0) {
+                        list($includeTsConfigFileExtensionKey, $includeTsConfigFilename) = explode(
                                 '/',
                                 substr($includeTsConfigFile, 4),
                                 2
                             );
                                 '/',
                                 substr($includeTsConfigFile, 4),
                                 2
                             );
-                            if ((string)$includeTsConfigFileExtensionKey !== ''
+                        if ((string)$includeTsConfigFileExtensionKey !== ''
                                 && ExtensionManagementUtility::isLoaded($includeTsConfigFileExtensionKey)
                                 && (string)$includeTsConfigFilename !== ''
                             ) {
                                 && ExtensionManagementUtility::isLoaded($includeTsConfigFileExtensionKey)
                                 && (string)$includeTsConfigFilename !== ''
                             ) {
-                                $includeTsConfigFileAndPath = ExtensionManagementUtility::extPath($includeTsConfigFileExtensionKey) .
+                            $includeTsConfigFileAndPath = ExtensionManagementUtility::extPath($includeTsConfigFileExtensionKey) .
                                     $includeTsConfigFilename;
                                     $includeTsConfigFilename;
-                                if (file_exists($includeTsConfigFileAndPath)) {
-                                    $TSdataArray['uid_' . $v['uid'] . '_static_' . $key] = file_get_contents($includeTsConfigFileAndPath);
-                                }
+                            if (file_exists($includeTsConfigFileAndPath)) {
+                                $TSdataArray['uid_' . $v['uid'] . '_static_' . $key] = file_get_contents($includeTsConfigFileAndPath);
                             }
                         }
                     }
                 }
                             }
                         }
                     }
                 }
-                $TSdataArray['uid_' . $v['uid']] = $v['TSconfig'];
-            }
-            $TSdataArray = static::emitGetPagesTSconfigPreIncludeSignal($TSdataArray, $id, $rootLine, $returnPartArray);
-            $TSdataArray = TypoScriptParser::checkIncludeLines_array($TSdataArray);
-            if ($returnPartArray) {
-                return $TSdataArray;
             }
             }
-            // Parsing the page TS-Config
-            $pageTS = implode(LF . '[GLOBAL]' . LF, $TSdataArray);
-            /* @var $parseObj \TYPO3\CMS\Backend\Configuration\TsConfigParser */
-            $parseObj = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Configuration\TsConfigParser::class);
-            $res = $parseObj->parseTSconfig($pageTS, 'PAGES', $id, $rootLine);
-            if ($res) {
-                $TSconfig = $res['TSconfig'];
-            }
-            $cacheHash = $res['hash'];
-            // Get User TSconfig overlay
-            $userTSconfig = static::getBackendUserAuthentication()->userTS['page.'];
-            if (is_array($userTSconfig)) {
-                ArrayUtility::mergeRecursiveWithOverrule($TSconfig, $userTSconfig);
-                $cacheHash .= '_user' . $GLOBALS['BE_USER']->user['uid'];
-            }
-
-            if ($useCacheForCurrentPageId) {
-                if (!isset($combinedTSconfig_cache[$cacheHash])) {
-                    $combinedTSconfig_cache[$cacheHash] = $TSconfig;
-                }
-                $pagesTSconfig_cacheReference[$id] = $cacheHash;
+            $TSdataArray['uid_' . $v['uid']] = $v['TSconfig'];
+        }
+        $TSdataArray = static::emitGetPagesTSconfigPreIncludeSignal($TSdataArray, $id, $rootLine, $returnPartArray);
+        $TSdataArray = TypoScriptParser::checkIncludeLines_array($TSdataArray);
+        if ($returnPartArray) {
+            return $TSdataArray;
+        }
+        // Parsing the page TS-Config
+        $pageTS = implode(LF . '[GLOBAL]' . LF, $TSdataArray);
+        /* @var $parseObj \TYPO3\CMS\Backend\Configuration\TsConfigParser */
+        $parseObj = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Configuration\TsConfigParser::class);
+        $res = $parseObj->parseTSconfig($pageTS, 'PAGES', $id, $rootLine);
+        if ($res) {
+            $TSconfig = $res['TSconfig'];
+        }
+        $cacheHash = $res['hash'];
+        // Get User TSconfig overlay
+        $userTSconfig = static::getBackendUserAuthentication()->userTS['page.'];
+        if (is_array($userTSconfig)) {
+            ArrayUtility::mergeRecursiveWithOverrule($TSconfig, $userTSconfig);
+            $cacheHash .= '_user' . $GLOBALS['BE_USER']->user['uid'];
+        }
+
+        if ($useCacheForCurrentPageId) {
+            if (!isset($combinedTSconfig_cache[$cacheHash])) {
+                $combinedTSconfig_cache[$cacheHash] = $TSconfig;
             }
             }
+            $pagesTSconfig_cacheReference[$id] = $cacheHash;
         }
         }
+
         return $TSconfig;
     }
 
         return $TSconfig;
     }
 
@@ -2239,9 +2238,8 @@ class BackendUtility
         }
         if ($fixed_lgd_chars) {
             return GeneralUtility::fixed_lgd_cs($l, $fixed_lgd_chars);
         }
         if ($fixed_lgd_chars) {
             return GeneralUtility::fixed_lgd_cs($l, $fixed_lgd_chars);
-        } else {
-            return $l;
         }
         }
+        return $l;
     }
 
     /**
     }
 
     /**
@@ -3153,9 +3151,8 @@ class BackendUtility
                 $beUser->pushModuleData($modName, $settings);
             }
             return $settings;
                 $beUser->pushModuleData($modName, $settings);
             }
             return $settings;
-        } else {
-            die('Wrong module name: "' . $modName . '"');
         }
         }
+        die('Wrong module name: "' . $modName . '"');
     }
 
     /**
     }
 
     /**
@@ -3695,9 +3692,8 @@ class BackendUtility
 
         if ($count) {
             return $msg ? sprintf($msg, $count) : $count;
 
         if ($count) {
             return $msg ? sprintf($msg, $count) : $count;
-        } else {
-            return $msg ? '' : 0;
         }
         }
+        return $msg ? '' : 0;
     }
 
     /**
     }
 
     /**
@@ -3744,9 +3740,8 @@ class BackendUtility
 
         if ($count) {
             return $msg ? sprintf($msg, $count) : $count;
 
         if ($count) {
             return $msg ? sprintf($msg, $count) : $count;
-        } else {
-            return $msg ? '' : 0;
         }
         }
+        return $msg ? '' : 0;
     }
 
     /*******************************************
     }
 
     /*******************************************
index 4db6848..d2e15fc 100644 (file)
@@ -200,7 +200,8 @@ class BackendLayoutView implements \TYPO3\CMS\Core\SingletonInterface
                         // If layout for "next level" is set to "none" - don't use any and stop searching
                         $this->selectedCombinedIdentifier[$pageId] = false;
                         break;
                         // If layout for "next level" is set to "none" - don't use any and stop searching
                         $this->selectedCombinedIdentifier[$pageId] = false;
                         break;
-                    } elseif ($this->selectedCombinedIdentifier[$pageId] !== '' && $this->selectedCombinedIdentifier[$pageId] !== '0') {
+                    }
+                    if ($this->selectedCombinedIdentifier[$pageId] !== '' && $this->selectedCombinedIdentifier[$pageId] !== '0') {
                         // Stop searching if a layout for "next level" is set
                         break;
                     }
                         // Stop searching if a layout for "next level" is set
                         break;
                     }
index e5c72b0..3edd00b 100644 (file)
@@ -248,9 +248,9 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
     {
         if (isset($this->externalTables[$table])) {
             return $this->getExternalTables($id, $table);
     {
         if (isset($this->externalTables[$table])) {
             return $this->getExternalTables($id, $table);
-        } else {
-            // Branch out based on table name:
-            switch ($table) {
+        }
+        // Branch out based on table name:
+        switch ($table) {
                 case 'pages':
                     return $this->getTable_pages($id);
                     break;
                 case 'pages':
                     return $this->getTable_pages($id);
                     break;
@@ -260,7 +260,6 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                 default:
                     return '';
             }
                 default:
                     return '';
             }
-        }
     }
 
     /**
     }
 
     /**
@@ -1854,9 +1853,8 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
         // Return values:
         if ($this->isDisabled('tt_content', $row)) {
             return '<span class="text-muted">' . $out . '</span>';
         // Return values:
         if ($this->isDisabled('tt_content', $row)) {
             return '<span class="text-muted">' . $out . '</span>';
-        } else {
-            return $out;
         }
         }
+        return $out;
     }
 
     /**
     }
 
     /**
@@ -2048,9 +2046,8 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
             $url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
             // Return link
             return '<a href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($this->getLanguageService()->getLL('edit')) . '">' . $str . '</a>';
             $url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
             // Return link
             return '<a href="' . htmlspecialchars($url) . '" title="' . htmlspecialchars($this->getLanguageService()->getLL('edit')) . '">' . $str . '</a>';
-        } else {
-            return $str;
         }
         }
+        return $str;
     }
 
     /**
     }
 
     /**
index e39ca1b..e68d887 100644 (file)
@@ -256,9 +256,8 @@ class PageTreeView extends BrowseTreeView
             // Activate dynamic ajax-based tree
             $js = htmlspecialchars('Tree.load(' . GeneralUtility::quoteJSvalue($cmd) . ', ' . (int)$isExpand . ', this);');
             return '<a class="list-tree-control' . (!$isExpand ? ' list-tree-control-open' : ' list-tree-control-closed') . '" onclick="' . $js . '"><i class="fa"></i></a>';
             // Activate dynamic ajax-based tree
             $js = htmlspecialchars('Tree.load(' . GeneralUtility::quoteJSvalue($cmd) . ', ' . (int)$isExpand . ', this);');
             return '<a class="list-tree-control' . (!$isExpand ? ' list-tree-control-open' : ' list-tree-control-closed') . '" onclick="' . $js . '"><i class="fa"></i></a>';
-        } else {
-            return $icon;
         }
         }
+        return $icon;
     }
 
     /**
     }
 
     /**
index c75633e..db58d08 100644 (file)
@@ -66,8 +66,7 @@ class ErrorIconViewHelper extends AbstractBackendViewHelper
         if ($errorSymbols[$arguments['errorNumber']]) {
             $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
             return $iconFactory->getIcon($errorSymbols[$arguments['errorNumber']], Icon::SIZE_SMALL)->render();
         if ($errorSymbols[$arguments['errorNumber']]) {
             $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
             return $iconFactory->getIcon($errorSymbols[$arguments['errorNumber']], Icon::SIZE_SMALL)->render();
-        } else {
-            return '';
         }
         }
+        return '';
     }
 }
     }
 }
index 0941a85..34b0e3f 100644 (file)
@@ -719,7 +719,8 @@ abstract class AbstractUserAuthentication
                         if ((int)$ret >= 200) {
                             $authenticated = true;
                             break;
                         if ((int)$ret >= 200) {
                             $authenticated = true;
                             break;
-                        } elseif ((int)$ret >= 100) {
+                        }
+                        if ((int)$ret >= 100) {
                         } else {
                             $authenticated = true;
                         }
                         } else {
                             $authenticated = true;
                         }
@@ -1142,14 +1143,13 @@ abstract class AbstractUserAuthentication
         $IP = GeneralUtility::getIndpEnv('REMOTE_ADDR');
         if ($parts >= 4) {
             return $IP;
         $IP = GeneralUtility::getIndpEnv('REMOTE_ADDR');
         if ($parts >= 4) {
             return $IP;
-        } else {
-            $parts = MathUtility::forceIntegerInRange($parts, 1, 3);
-            $IPparts = explode('.', $IP);
-            for ($a = 4; $a > $parts; $a--) {
-                unset($IPparts[$a - 1]);
-            }
-            return implode('.', $IPparts);
         }
         }
+        $parts = MathUtility::forceIntegerInRange($parts, 1, 3);
+        $IPparts = explode('.', $IP);
+        for ($a = 4; $a > $parts; $a--) {
+            unset($IPparts[$a - 1]);
+        }
+        return implode('.', $IPparts);
     }
 
     /*************************
     }
 
     /*************************
index f552fb3..3fc78ee 100644 (file)
@@ -437,9 +437,8 @@ class BackendUserAuthentication extends AbstractUserAuthentication
         }
         if (!$acs && $exitOnError) {
             throw new \RuntimeException('Access Error: You don\'t have access to this module.', 1294586448);
         }
         if (!$acs && $exitOnError) {
             throw new \RuntimeException('Access Error: You don\'t have access to this module.', 1294586448);
-        } else {
-            return $acs;
         }
         }
+        return $acs;
     }
 
     /**
     }
 
     /**
@@ -515,9 +514,8 @@ class BackendUserAuthentication extends AbstractUserAuthentication
                 }
             }
             return $constraint;
                 }
             }
             return $constraint;
-        } else {
-            return ' 1=0';
         }
         }
+        return ' 1=0';
     }
 
     /**
     }
 
     /**
@@ -770,7 +768,8 @@ class BackendUserAuthentication extends AbstractUserAuthentication
                 if (!$this->checkLanguageAccess($idOrRow[$GLOBALS['TCA'][$table]['ctrl']['languageField']])) {
                     $this->errorMsg = 'ERROR: Language was not allowed.';
                     return false;
                 if (!$this->checkLanguageAccess($idOrRow[$GLOBALS['TCA'][$table]['ctrl']['languageField']])) {
                     $this->errorMsg = 'ERROR: Language was not allowed.';
                     return false;
-                } elseif (
+                }
+                if (
                     $checkFullLanguageAccess && $idOrRow[$GLOBALS['TCA'][$table]['ctrl']['languageField']] == 0
                     && !$this->checkFullLanguagesAccess($table, $idOrRow)
                 ) {
                     $checkFullLanguageAccess && $idOrRow[$GLOBALS['TCA'][$table]['ctrl']['languageField']] == 0
                     && !$this->checkFullLanguagesAccess($table, $idOrRow)
                 ) {
@@ -916,36 +915,32 @@ class BackendUserAuthentication extends AbstractUserAuthentication
                     // No versioning, basic error, inconsistency even! Such records should not have a pid of -1!
                     if (!$GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                         return 'Versioning disabled for table';
                     // No versioning, basic error, inconsistency even! Such records should not have a pid of -1!
                     if (!$GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                         return 'Versioning disabled for table';
-                    } elseif ((int)$recData['t3ver_wsid'] !== $this->workspace) {
+                    }
+                    if ((int)$recData['t3ver_wsid'] !== $this->workspace) {
                         // So does workspace match?
                         return 'Workspace ID of record didn\'t match current workspace';
                         // So does workspace match?
                         return 'Workspace ID of record didn\'t match current workspace';
-                    } else {
-                        // So is the user allowed to "use" the edit stage within the workspace?
-                        return $this->workspaceCheckStageForCurrent(0)
+                    }
+                    // So is the user allowed to "use" the edit stage within the workspace?
+                    return $this->workspaceCheckStageForCurrent(0)
                             ? false
                             : 'User\'s access level did not allow for editing';
                             ? false
                             : 'User\'s access level did not allow for editing';
-                    }
-                } else {
-                    // We are testing a "live" record:
-                    // For "Live" records, check that PID for table allows editing
-                    if ($res = $this->workspaceAllowLiveRecordsInPID($recData['pid'], $table)) {
-                        // Live records are OK in this branch, but what about the stage of branch point, if any:
-                        // OK
-                        return $res > 0
+                }
+                // We are testing a "live" record:
+                // For "Live" records, check that PID for table allows editing
+                if ($res = $this->workspaceAllowLiveRecordsInPID($recData['pid'], $table)) {
+                    // Live records are OK in this branch, but what about the stage of branch point, if any:
+                    // OK
+                    return $res > 0
                             ? false
                             : 'Stage for versioning root point and users access level did not allow for editing';
                             ? false
                             : 'Stage for versioning root point and users access level did not allow for editing';
-                    } else {
-                        // If not offline and not in versionized branch, output error:
-                        return 'Online record was not in versionized branch!';
-                    }
                 }
                 }
-            } else {
-                return 'No record';
+                // If not offline and not in versionized branch, output error:
+                return 'Online record was not in versionized branch!';
             }
             }
-        } else {
-            // OK because workspace is 0
-            return false;
+            return 'No record';
         }
         }
+        // OK because workspace is 0
+        return false;
     }
 
     /**
     }
 
     /**
@@ -965,15 +960,12 @@ class BackendUserAuthentication extends AbstractUserAuthentication
             if (is_array($recData)) {
                 if ((int)$recData['pid'] === -1) {
                     return $this->workspaceCannotEditRecord($table, $recData);
             if (is_array($recData)) {
                 if ((int)$recData['pid'] === -1) {
                     return $this->workspaceCannotEditRecord($table, $recData);
-                } else {
-                    return 'Not an offline version';
                 }
                 }
-            } else {
-                return 'No record';
+                return 'Not an offline version';
             }
             }
-        } else {
-            return 'Table does not support versioning.';
+            return 'No record';
         }
         }
+        return 'Table does not support versioning.';
     }
 
     /**
     }
 
     /**
@@ -998,10 +990,9 @@ class BackendUserAuthentication extends AbstractUserAuthentication
         ) {
             // OK to create for this table.
             return 2;
         ) {
             // OK to create for this table.
             return 2;
-        } else {
-            // If the answer is FALSE it means the only valid way to create or edit records in the PID is by versioning
-            return false;
         }
         }
+        // If the answer is FALSE it means the only valid way to create or edit records in the PID is by versioning
+        return false;
     }
 
     /**
     }
 
     /**
@@ -1094,9 +1085,8 @@ class BackendUserAuthentication extends AbstractUserAuthentication
             } elseif ($stage == -10 || $stage == -20) {
                 if ($stat['_ACCESS'] === 'owner') {
                     return true;
             } elseif ($stage == -10 || $stage == -20) {
                 if ($stat['_ACCESS'] === 'owner') {
                     return true;
-                } else {
-                    return false;
                 }
                 }
+                return false;
             } else {
                 $memberStageLimit = $this->workspaceRec['review_stage_edit'] ? 1 : 0;
                 if (
             } else {
                 $memberStageLimit = $this->workspaceRec['review_stage_edit'] ? 1 : 0;
                 if (
@@ -1159,9 +1149,8 @@ class BackendUserAuthentication extends AbstractUserAuthentication
     {
         if ($this->workspace > 0 && (int)$this->workspaceRec['swap_modes'] === 2) {
             return false;
     {
         if ($this->workspace > 0 && (int)$this->workspaceRec['swap_modes'] === 2) {
             return false;
-        } else {
-            return true;
         }
         }
+        return true;
     }
 
     /**
     }
 
     /**
@@ -1962,9 +1951,8 @@ class BackendUserAuthentication extends AbstractUserAuthentication
 
         if ($uploadFolder instanceof \TYPO3\CMS\Core\Resource\Folder) {
             return $uploadFolder;
 
         if ($uploadFolder instanceof \TYPO3\CMS\Core\Resource\Folder) {
             return $uploadFolder;
-        } else {
-            return false;
         }
         }
+        return false;
     }
 
     /**
     }
 
     /**
@@ -2097,8 +2085,8 @@ class BackendUserAuthentication extends AbstractUserAuthentication
         if (is_array($wsRec)) {
             if ($this->isAdmin()) {
                 return array_merge($wsRec, ['_ACCESS' => 'admin']);
         if (is_array($wsRec)) {
             if ($this->isAdmin()) {
                 return array_merge($wsRec, ['_ACCESS' => 'admin']);
-            } else {
-                switch ((string)$wsRec['uid']) {
+            }
+            switch ((string)$wsRec['uid']) {
                     case '0':
                         $retVal = $this->groupData['workspace_perms'] & Permission::PAGE_SHOW
                             ? array_merge($wsRec, ['_ACCESS' => 'online'])
                     case '0':
                         $retVal = $this->groupData['workspace_perms'] & Permission::PAGE_SHOW
                             ? array_merge($wsRec, ['_ACCESS' => 'online'])
@@ -2136,7 +2124,6 @@ class BackendUserAuthentication extends AbstractUserAuthentication
                             }
                         }
                 }
                             }
                         }
                 }
-            }
         }
         return $retVal;
     }
         }
         return $retVal;
     }
index dc6cfa2..508873c 100644 (file)
@@ -208,9 +208,8 @@ class ApcBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
         $identifiers = apc_fetch($this->getIdentifierPrefix() . 'tag_' . $tag, $success);
         if ($success === false) {
             return [];
         $identifiers = apc_fetch($this->getIdentifierPrefix() . 'tag_' . $tag, $success);
         if ($success === false) {
             return [];
-        } else {
-            return (array)$identifiers;
         }
         }
+        return (array)$identifiers;
     }
 
     /**
     }
 
     /**
index 3e550b1..b9eb0c0 100644 (file)
@@ -208,9 +208,8 @@ class ApcuBackend extends AbstractBackend implements TaggableBackendInterface
         $identifiers = apcu_fetch($this->getIdentifierPrefix() . 'tag_' . $tag, $success);
         if ($success === false) {
             return [];
         $identifiers = apcu_fetch($this->getIdentifierPrefix() . 'tag_' . $tag, $success);
         if ($success === false) {
             return [];
-        } else {
-            return (array)$identifiers;
         }
         }
+        return (array)$identifiers;
     }
 
     /**
     }
 
     /**
index 534386c..2817219 100644 (file)
@@ -376,15 +376,13 @@ class FileBackend extends \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend implem
         if ($this->frozen === true) {
             if (isset($this->cacheEntryIdentifiers[$entryIdentifier])) {
                 return require_once $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
         if ($this->frozen === true) {
             if (isset($this->cacheEntryIdentifiers[$entryIdentifier])) {
                 return require_once $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
-            } else {
-                return false;
-            }
-        } else {
-            if ($entryIdentifier !== basename($entryIdentifier)) {
-                throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1282073036);
             }
             }
-            $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
-            return $this->isCacheFileExpired($pathAndFilename) ? false : require_once $pathAndFilename;
+            return false;
         }
         }
+        if ($entryIdentifier !== basename($entryIdentifier)) {
+            throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1282073036);
+        }
+        $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
+        return $this->isCacheFileExpired($pathAndFilename) ? false : require_once $pathAndFilename;
     }
 }
     }
 }
index 7dbd47a..803bc18 100644 (file)
@@ -278,9 +278,8 @@ class MemcachedBackend extends AbstractBackend implements TaggableBackendInterfa
     {
         if ($this->usedPeclModule === 'memcache') {
             return $this->memcache->set($this->identifierPrefix . $entryIdentifier, $data, $this->flags, $expiration);
     {
         if ($this->usedPeclModule === 'memcache') {
             return $this->memcache->set($this->identifierPrefix . $entryIdentifier, $data, $this->flags, $expiration);
-        } else {
-            return $this->memcache->set($this->identifierPrefix . $entryIdentifier, $data, $expiration);
         }
         }
+        return $this->memcache->set($this->identifierPrefix . $entryIdentifier, $data, $expiration);
     }
 
     /**
     }
 
     /**
@@ -349,9 +348,8 @@ class MemcachedBackend extends AbstractBackend implements TaggableBackendInterfa
         $identifiers = $this->memcache->get($this->identifierPrefix . 'tag_' . $tag);
         if ($identifiers !== false) {
             return (array)$identifiers;
         $identifiers = $this->memcache->get($this->identifierPrefix . 'tag_' . $tag);
         if ($identifiers !== false) {
             return (array)$identifiers;
-        } else {
-            return [];
         }
         }
+        return [];
     }
 
     /**
     }
 
     /**
index 6fc76bc..46fde70 100644 (file)
@@ -95,9 +95,8 @@ class TransientMemoryBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBacke
                 }
             }
             return true;
                 }
             }
             return true;
-        } else {
-            return false;
         }
         }
+        return false;
     }
 
     /**
     }
 
     /**
@@ -112,9 +111,8 @@ class TransientMemoryBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBacke
     {
         if (isset($this->tagsAndEntries[$tag])) {
             return array_keys($this->tagsAndEntries[$tag]);
     {
         if (isset($this->tagsAndEntries[$tag])) {
             return array_keys($this->tagsAndEntries[$tag]);
-        } else {
-            return [];
         }
         }
+        return [];
     }
 
     /**
     }
 
     /**
index b04eb2d..982d697 100644 (file)
@@ -139,9 +139,8 @@ class WincacheBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impl
         $identifiers = wincache_ucache_get($this->identifierPrefix . 'tag_' . $tag, $success);
         if ($success === false) {
             return [];
         $identifiers = wincache_ucache_get($this->identifierPrefix . 'tag_' . $tag, $success);
         if ($success === false) {
             return [];
-        } else {
-            return (array)$identifiers;
         }
         }
+        return (array)$identifiers;
     }
 
     /**
     }
 
     /**
index 92c8ee7..bcb921d 100644 (file)
@@ -83,9 +83,8 @@ class VariableFrontend extends AbstractFrontend
         $rawResult = $this->backend->get($entryIdentifier);
         if ($rawResult === false) {
             return false;
         $rawResult = $this->backend->get($entryIdentifier);
         if ($rawResult === false) {
             return false;
-        } else {
-            return $this->backend instanceof TransientBackendInterface ? $rawResult : unserialize($rawResult);
         }
         }
+        return $this->backend instanceof TransientBackendInterface ? $rawResult : unserialize($rawResult);
     }
 
     /**
     }
 
     /**
index 6f2c6cf..ff1e600 100644 (file)
@@ -683,12 +683,10 @@ class CharsetConverter implements SingletonInterface
                     }
                 }
                 return 2;
                     }
                 }
                 return 2;
-            } else {
-                return false;
             }
             }
-        } else {
-            return 1;
+            return false;
         }
         }
+        return 1;
     }
 
     /**
     }
 
     /**
@@ -907,10 +905,9 @@ class CharsetConverter implements SingletonInterface
                 $ord = hexdec($code_value);
                 if ($ord > 127) {
                     continue 2;
                 $ord = hexdec($code_value);
                 if ($ord > 127) {
                     continue 2;
-                } else {
-                    // Skip decompositions containing non-ASCII chars
-                    $code_decomp[] = chr($ord);
                 }
                 }
+                // Skip decompositions containing non-ASCII chars
+                $code_decomp[] = chr($ord);
             }
             $ascii[$this->UnumberToChar(hexdec($from))] = implode('', $code_decomp);
         }
             }
             $ascii[$this->UnumberToChar(hexdec($from))] = implode('', $code_decomp);
         }
index 2e79e24..fe6a1c5 100644 (file)
@@ -168,30 +168,30 @@ class YamlFileLoader
         // Simple lists get merged / added up
         if (count(array_filter(array_keys($val1), 'is_int')) === count($val1)) {
             return array_merge($val1, $val2);
         // Simple lists get merged / added up
         if (count(array_filter(array_keys($val1), 'is_int')) === count($val1)) {
             return array_merge($val1, $val2);
-        } else {
-            foreach ($val1 as $k => $v) {
-                // The key also exists in second array, if it is a simple value
-                // then $val2 will override the value, where an array is calling merge() recursively.
-                if (isset($val2[$k])) {
-                    if (is_array($v) && isset($val2[$k])) {
-                        if (is_array($val2[$k])) {
-                            $val1[$k] = $this->merge($v, $val2[$k]);
-                        } else {
-                            $val1[$k] = $val2[$k];
-                        }
+        }
+        foreach ($val1 as $k => $v) {
+            // The key also exists in second array, if it is a simple value
+            // then $val2 will override the value, where an array is calling merge() recursively.
+            if (isset($val2[$k])) {
+                if (is_array($v) && isset($val2[$k])) {
+                    if (is_array($val2[$k])) {
+                        $val1[$k] = $this->merge($v, $val2[$k]);
                     } else {
                         $val1[$k] = $val2[$k];
                     }
                     } else {
                         $val1[$k] = $val2[$k];
                     }
-                    unset($val2[$k]);
+                } else {
+                    $val1[$k] = $val2[$k];
                 }
                 }
+                unset($val2[$k]);
             }
             }
-            // If there are properties in the second array left, they are added up
-            if (!empty($val2)) {
-                foreach ($val2 as $k => $v) {
-                    $val1[$k] = $v;
-                }
+        }
+        // If there are properties in the second array left, they are added up
+        if (!empty($val2)) {
+            foreach ($val2 as $k => $v) {
+                $val1[$k] = $v;
             }
         }
             }
         }
+
         return $val1;
     }
 }
         return $val1;
     }
 }
index 3c5f214..1c67ec5 100644 (file)
@@ -584,9 +584,8 @@ abstract class AbstractConditionMatcher
         }
         if (!is_array($theVar) && !is_object($theVar)) {
             return $theVar;
         }
         if (!is_array($theVar) && !is_object($theVar)) {
             return $theVar;
-        } else {
-            return '';
         }
         }
+        return '';
     }
 
     /**
     }
 
     /**
index ab6dc3d..e64e42b 100644 (file)
@@ -89,9 +89,8 @@ class FileDumpController
             $file->getStorage()->dumpFileContents($file);
             // @todo Refactor FAL to not echo directly, but to implement a stream for output here and use response
             return null;
             $file->getStorage()->dumpFileContents($file);
             // @todo Refactor FAL to not echo directly, but to implement a stream for output here and use response
             return null;
-        } else {
-            return $response->withStatus(403);
         }
         }
+        return $response->withStatus(403);
     }
 
     /**
     }
 
     /**
index 49465e4..b1e97d9 100644 (file)
@@ -152,9 +152,8 @@ class ClassLoadingInformation
     {
         if (self::isTestingContext()) {
             return PATH_site . self::AUTOLOAD_INFO_DIR_TESTS;
     {
         if (self::isTestingContext()) {
             return PATH_site . self::AUTOLOAD_INFO_DIR_TESTS;
-        } else {
-            return PATH_site . self::AUTOLOAD_INFO_DIR;
         }
         }
+        return PATH_site . self::AUTOLOAD_INFO_DIR;
     }
 
     /**
     }
 
     /**
index fb96fd2..78c7149 100644 (file)
@@ -5468,7 +5468,8 @@ class DataHandler
         } else {
             if ($pageIdsInBranch === -1) {
                 return 'Attempt to delete page without permissions';
         } else {
             if ($pageIdsInBranch === -1) {
                 return 'Attempt to delete page without permissions';
-            } elseif ($pageIdsInBranch !== '') {
+            }
+            if ($pageIdsInBranch !== '') {
                 return 'Attempt to delete page which has subpages';
             }
 
                 return 'Attempt to delete page which has subpages';
             }
 
@@ -5499,9 +5500,8 @@ class DataHandler
         if ($table === 'pages') {
             $res = $this->canDeletePage($id);
             return is_array($res) ? false : $res;
         if ($table === 'pages') {
             $res = $this->canDeletePage($id);
             return is_array($res) ? false : $res;
-        } else {
-            return $this->doesRecordExist($table, $id, 'delete') ? false : 'No permission to delete record';
         }
         }
+        return $this->doesRecordExist($table, $id, 'delete') ? false : 'No permission to delete record';
     }
 
     /**
     }
 
     /**
@@ -6495,14 +6495,15 @@ class DataHandler
         }
         if ($res === 1 || $res === 0) {
             return $res;
         }
         if ($res === 1 || $res === 0) {
             return $res;
-        } else {
-            $res = 0;
         }
         }
+        $res = 0;
+
         if ($GLOBALS['TCA'][$table] && (int)$id > 0) {
             // If information is cached, return it
             if (isset($this->recUpdateAccessCache[$table][$id])) {
                 return $this->recUpdateAccessCache[$table][$id];
         if ($GLOBALS['TCA'][$table] && (int)$id > 0) {
             // If information is cached, return it
             if (isset($this->recUpdateAccessCache[$table][$id])) {
                 return $this->recUpdateAccessCache[$table][$id];
-            } elseif ($this->doesRecordExist($table, $id, 'edit')) {
+            }
+            if ($this->doesRecordExist($table, $id, 'edit')) {
                 $res = 1;
             }
             // Cache the result
                 $res = 1;
             }
             // Cache the result
@@ -6758,9 +6759,8 @@ class DataHandler
                 BackendUtility::fixVersioningPid('pages', $row);
                 if ($row['pid'] == $id) {
                     return false;
                 BackendUtility::fixVersioningPid('pages', $row);
                 if ($row['pid'] == $id) {
                     return false;
-                } else {
-                    $destinationId = (int)$row['pid'];
                 }
                 }
+                $destinationId = (int)$row['pid'];
             } else {
                 return false;
             }
             } else {
                 return false;
             }
@@ -6970,9 +6970,8 @@ class DataHandler
                     }
                 }
                 return false;
                     }
                 }
                 return false;
-            } else {
-                return $this->doesRecordExist_pageLookUp($id, $perms, $columns);
             }
             }
+            return $this->doesRecordExist_pageLookUp($id, $perms, $columns);
         }
         return false;
     }
         }
         return false;
     }
@@ -7190,7 +7189,8 @@ class DataHandler
                         $this->registerRecordIdForPageCacheClearing($table, $id);
                     }
                     return $id;
                         $this->registerRecordIdForPageCacheClearing($table, $id);
                     }
                     return $id;
-                } elseif ($this->enableLogging) {
+                }
+                if ($this->enableLogging) {
                     $this->log($table, $id, 1, 0, 2, 'SQL error: \'%s\' (%s)', 12, [$insertErrorMessage, $table . ':' . $id]);
                 }
             }
                     $this->log($table, $id, 1, 0, 2, 'SQL error: \'%s\' (%s)', 12, [$insertErrorMessage, $table . ':' . $id]);
                 }
             }
@@ -7350,19 +7350,17 @@ class DataHandler
                         $this->resorting($table, $pid, $sortRow, 0);
                         // First sorting number after resorting
                         return $this->sortIntervals;
                         $this->resorting($table, $pid, $sortRow, 0);
                         // First sorting number after resorting
                         return $this->sortIntervals;
-                    } else {
-                        // Sorting number between current top element and zero
-                        return floor($row[$sortRow] / 2);
                     }
                     }
-                } else {
-                    // No pages, so we choose the default value as sorting-number
-                    // First sorting number if no elements.
-                    return $this->sortIntervals;
+                    // Sorting number between current top element and zero
+                    return floor($row[$sortRow] / 2);
                 }
                 }
-            } else {
-                // Sorting number is inside the list
-                // Fetches the record which is supposed to be the prev record
-                $row = $queryBuilder
+                // No pages, so we choose the default value as sorting-number
+                // First sorting number if no elements.
+                return $this->sortIntervals;
+            }
+            // Sorting number is inside the list
+            // Fetches the record which is supposed to be the prev record
+            $row = $queryBuilder
                     ->where($queryBuilder->expr()->eq(
                         'uid',
                         $queryBuilder->createNamedParameter(abs($pid), \PDO::PARAM_INT)
                     ->where($queryBuilder->expr()->eq(
                         'uid',
                         $queryBuilder->createNamedParameter(abs($pid), \PDO::PARAM_INT)
@@ -7370,24 +7368,24 @@ class DataHandler
                     ->execute()
                     ->fetch();
 
                     ->execute()
                     ->fetch();
 
-                // There was a record
-                if (!empty($row)) {
-                    // Look, if the record UID happens to be an offline record. If so, find its live version. Offline uids will be used when a page is versionized as "branch" so this is when we must correct - otherwise a pid of "-1" and a wrong sort-row number is returned which we don't want.
-                    if ($lookForLiveVersion = BackendUtility::getLiveVersionOfRecord($table, $row['uid'], $sortRow . ',pid,uid')) {
-                        $row = $lookForLiveVersion;
-                    }
-                    // Fetch move placeholder, since it might point to a new page in the current workspace
-                    if ($movePlaceholder = BackendUtility::getMovePlaceholder($table, $row['uid'], 'uid,pid,' . $sortRow)) {
-                        $row = $movePlaceholder;
-                    }
-                    // If the record should be inserted after itself, keep the current sorting information:
-                    if ((int)$row['uid'] === (int)$uid) {
-                        $sortNumber = $row[$sortRow];
-                    } else {
-                        $queryBuilder = $connectionPool->getQueryBuilderForTable($table);
-                        $this->addDeleteRestriction($queryBuilder->getRestrictions()->removeAll());
+            // There was a record
+            if (!empty($row)) {
+                // Look, if the record UID happens to be an offline record. If so, find its live version. Offline uids will be used when a page is versionized as "branch" so this is when we must correct - otherwise a pid of "-1" and a wrong sort-row number is returned which we don't want.
+                if ($lookForLiveVersion = BackendUtility::getLiveVersionOfRecord($table, $row['uid'], $sortRow . ',pid,uid')) {
+                    $row = $lookForLiveVersion;
+                }
+                // Fetch move placeholder, since it might point to a new page in the current workspace
+                if ($movePlaceholder = BackendUtility::getMovePlaceholder($table, $row['uid'], 'uid,pid,' . $sortRow)) {
+                    $row = $movePlaceholder;
+                }
+                // If the record should be inserted after itself, keep the current sorting information:
+                if ((int)$row['uid'] === (int)$uid) {
+                    $sortNumber = $row[$sortRow];
+                } else {
+                    $queryBuilder = $connectionPool->getQueryBuilderForTable($table);
+                    $this->addDeleteRestriction($queryBuilder->getRestrictions()->removeAll());
 
 
-                        $subResults = $queryBuilder
+                    $subResults = $queryBuilder
                             ->select($sortRow, 'pid', 'uid')
                             ->from($table)
                             ->where(
                             ->select($sortRow, 'pid', 'uid')
                             ->from($table)
                             ->where(
@@ -7404,34 +7402,32 @@ class DataHandler
                             ->setMaxResults(2)
                             ->execute()
                             ->fetchAll();
                             ->setMaxResults(2)
                             ->execute()
                             ->fetchAll();
-                        // Fetches the next record in order to calculate the in-between sortNumber
-                        // There was a record afterwards
-                        if (count($subResults) === 2) {
-                            // There was a record afterwards, fetch that
-                            $subrow = array_pop($subResults);
-                            // The sortNumber is found in between these values
-                            $sortNumber = $row[$sortRow] + floor(($subrow[$sortRow] - $row[$sortRow]) / 2);
-                            // The sortNumber happened NOT to be between the two surrounding numbers, so we'll have to resort the list
-                            if ($sortNumber <= $row[$sortRow] || $sortNumber >= $subrow[$sortRow]) {
-                                // By this special param, resorting reserves and returns the sortnumber after the uid
-                                $sortNumber = $this->resorting($table, $row['pid'], $sortRow, $row['uid']);
-                            }
-                        } else {
-                            // If after the last record in the list, we just add the sortInterval to the last sortvalue
-                            $sortNumber = $row[$sortRow] + $this->sortIntervals;
+                    // Fetches the next record in order to calculate the in-between sortNumber
+                    // There was a record afterwards
+                    if (count($subResults) === 2) {
+                        // There was a record afterwards, fetch that
+                        $subrow = array_pop($subResults);
+                        // The sortNumber is found in between these values
+                        $sortNumber = $row[$sortRow] + floor(($subrow[$sortRow] - $row[$sortRow]) / 2);
+                        // The sortNumber happened NOT to be between the two surrounding numbers, so we'll have to resort the list
+                        if ($sortNumber <= $row[$sortRow] || $sortNumber >= $subrow[$sortRow]) {
+                            // By this special param, resorting reserves and returns the sortnumber after the uid
+                            $sortNumber = $this->resorting($table, $row['pid'], $sortRow, $row['uid']);
                         }
                         }
+                    } else {
+                        // If after the last record in the list, we just add the sortInterval to the last sortvalue
+                        $sortNumber = $row[$sortRow] + $this->sortIntervals;
                     }
                     }
-                    return ['pid' => $row['pid'], 'sortNumber' => $sortNumber];
-                } else {
-                    if ($this->enableLogging) {
-                        $propArr = $this->getRecordProperties($table, $uid);
-                        // OK, don't insert $propArr['event_pid'] here...
-                        $this->log($table, $uid, 4, 0, 1, 'Attempt to move record \'%s\' (%s) to after a non-existing record (uid=%s)', 1, [$propArr['header'], $table . ':' . $uid, abs($pid)], $propArr['pid']);
-                    }
-                    // There MUST be a page or else this cannot work
-                    return false;
                 }
                 }
+                return ['pid' => $row['pid'], 'sortNumber' => $sortNumber];
             }
             }
+            if ($this->enableLogging) {
+                $propArr = $this->getRecordProperties($table, $uid);
+                // OK, don't insert $propArr['event_pid'] here...
+                $this->log($table, $uid, 4, 0, 1, 'Attempt to move record \'%s\' (%s) to after a non-existing record (uid=%s)', 1, [$propArr['header'], $table . ':' . $uid, abs($pid)], $propArr['pid']);
+            }
+            // There MUST be a page or else this cannot work
+            return false;
         }
         return null;
     }
         }
         return null;
     }
@@ -7810,9 +7806,8 @@ class DataHandler
         // Returns the proper delete-clause if any for a table from TCA
         if (!$this->disableDeleteClause && $GLOBALS['TCA'][$table]['ctrl']['delete']) {
             return ' AND ' . $table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'] . '=0';
         // Returns the proper delete-clause if any for a table from TCA
         if (!$this->disableDeleteClause && $GLOBALS['TCA'][$table]['ctrl']['delete']) {
             return ' AND ' . $table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'] . '=0';
-        } else {
-            return '';
         }
         }
+        return '';
     }
 
     /**
     }
 
     /**
@@ -8132,13 +8127,13 @@ class DataHandler
         if ($conf['foreign_field']) {
             // The reference to the parent is stored in a pointer field in the child record
             return 'field';
         if ($conf['foreign_field']) {
             // The reference to the parent is stored in a pointer field in the child record
             return 'field';
-        } elseif ($conf['MM']) {
+        }
+        if ($conf['MM']) {
             // Regular MM intermediate table is used to store data
             return 'mm';
             // Regular MM intermediate table is used to store data
             return 'mm';
-        } else {
-            // An item list (separated by comma) is stored (like select type is doing)
-            return 'list';
         }
         }
+        // An item list (separated by comma) is stored (like select type is doing)
+        return 'list';
     }
 
     /**
     }
 
     /**
@@ -8314,7 +8309,8 @@ class DataHandler
         // If the record was copied:
         if (isset($this->copyMappingArray[$table][$uid])) {
             return true;
         // If the record was copied:
         if (isset($this->copyMappingArray[$table][$uid])) {
             return true;
-        } elseif (isset($this->copyMappingArray[$table]) && in_array($uid, array_values($this->copyMappingArray[$table]))) {
+        }
+        if (isset($this->copyMappingArray[$table]) && in_array($uid, array_values($this->copyMappingArray[$table]))) {
             return true;
         }
         return false;
             return true;
         }
         return false;
index b1fea73..4cf0e7a 100644 (file)
@@ -434,13 +434,13 @@ class DataMapItem
     {
         if (MathUtility::canBeInterpretedAsInteger($idValue)) {
             return $idValue;
     {
         if (MathUtility::canBeInterpretedAsInteger($idValue)) {
             return $idValue;
-        } elseif (strpos($idValue, 'NEW') === 0) {
+        }
+        if (strpos($idValue, 'NEW') === 0) {
             return $idValue;
             return $idValue;
-        } else {
-            // @todo Handle if $tableName does not match $this->tableName
-            list($tableName, $id) = BackendUtility::splitTable_Uid($idValue);
-            return $id;
         }
         }
+        // @todo Handle if $tableName does not match $this->tableName
+        list($tableName, $id) = BackendUtility::splitTable_Uid($idValue);
+        return $id;
     }
 
     /**
     }
 
     /**
index a44bc2e..4f5daa4 100644 (file)
@@ -1156,7 +1156,8 @@ class DataMapProcessor
             && $element[$fieldNames['source']] !== $element[$fieldNames['parent']]
         ) {
             return (int)$fieldNames['source'];
             && $element[$fieldNames['source']] !== $element[$fieldNames['parent']]
         ) {
             return (int)$fieldNames['source'];
-        } elseif (!empty($fieldNames['parent'])) {
+        }
+        if (!empty($fieldNames['parent'])) {
             // implicit: use parent pointer if defined
             return (int)$element[$fieldNames['parent']];
         }
             // implicit: use parent pointer if defined
             return (int)$element[$fieldNames['parent']];
         }
index bb18eb4..069a5a5 100644 (file)
@@ -76,11 +76,11 @@ class QueryHelper
 
                 if (!empty($as) && strtolower($as) === 'as' && !empty($alias)) {
                     return [$tableName, $alias];
 
                 if (!empty($as) && strtolower($as) === 'as' && !empty($alias)) {
                     return [$tableName, $alias];
-                } elseif (!empty($as) && empty($alias)) {
+                }
+                if (!empty($as) && empty($alias)) {
                     return [$tableName, $as];
                     return [$tableName, $as];
-                } else {
-                    return [$tableName, null];
                 }
                 }
+                return [$tableName, null];
             },
             $tableExpressions
         );
             },
             $tableExpressions
         );
index 6f115ef..39c5a68 100644 (file)
@@ -899,13 +899,15 @@ class ReferenceIndex
         // Get IRRE relations
         if (empty($conf)) {
             return false;
         // Get IRRE relations
         if (empty($conf)) {
             return false;
-        } elseif ($conf['type'] === 'inline' && !empty($conf['foreign_table']) && empty($conf['MM'])) {
+        }
+        if ($conf['type'] === 'inline' && !empty($conf['foreign_table']) && empty($conf['MM'])) {
             $dbAnalysis = GeneralUtility::makeInstance(RelationHandler::class);
             $dbAnalysis->setUseLiveReferenceIds(false);
             $dbAnalysis->start($value, $conf['foreign_table'], '', $uid, $table, $conf);
             return $dbAnalysis->itemArray;
             // DB record lists:
             $dbAnalysis = GeneralUtility::makeInstance(RelationHandler::class);
             $dbAnalysis->setUseLiveReferenceIds(false);
             $dbAnalysis->start($value, $conf['foreign_table'], '', $uid, $table, $conf);
             return $dbAnalysis->itemArray;
             // DB record lists:
-        } elseif ($this->isDbReferenceField($conf)) {
+        }
+        if ($this->isDbReferenceField($conf)) {
             $allowedTables = $conf['type'] === 'group' ? $conf['allowed'] : $conf['foreign_table'];
             if ($conf['MM_opposite_field']) {
                 return [];
             $allowedTables = $conf['type'] === 'group' ? $conf['allowed'] : $conf['foreign_table'];
             if ($conf['MM_opposite_field']) {
                 return [];
@@ -1042,21 +1044,20 @@ class ReferenceIndex
                     // Data Array, now ready to be sent to DataHandler
                     if ($returnDataArray) {
                         return $dataArray;
                     // Data Array, now ready to be sent to DataHandler
                     if ($returnDataArray) {
                         return $dataArray;
-                    } else {
-                        // Execute CMD array:
-                        $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
-                        $dataHandler->dontProcessTransformations = true;
-                        $dataHandler->bypassWorkspaceRestrictions = true;
-                        $dataHandler->bypassFileHandling = true;
-                        // Otherwise this cannot update things in deleted records...
-                        $dataHandler->bypassAccessCheckForRecords = true;
-                        // Check has been done previously that there is a backend user which is Admin and also in live workspace
-                        $dataHandler->start($dataArray, []);
-                        $dataHandler->process_datamap();
-                        // Return errors if any:
-                        if (!empty($dataHandler->errorLog)) {
-                            return LF . 'DataHandler:' . implode((LF . 'DataHandler:'), $dataHandler->errorLog);
-                        }
+                    }
+                    // Execute CMD array:
+                    $dataHandler = GeneralUtility::makeInstance(DataHandler::class);
+                    $dataHandler->dontProcessTransformations = true;
+                    $dataHandler->bypassWorkspaceRestrictions = true;
+                    $dataHandler->bypassFileHandling = true;
+                    // Otherwise this cannot update things in deleted records...
+                    $dataHandler->bypassAccessCheckForRecords = true;
+                    // Check has been done previously that there is a backend user which is Admin and also in live workspace
+                    $dataHandler->start($dataArray, []);
+                    $dataHandler->process_datamap();
+                    // Return errors if any:
+                    if (!empty($dataHandler->errorLog)) {
+                        return LF . 'DataHandler:' . implode((LF . 'DataHandler:'), $dataHandler->errorLog);
                     }
                 }
             }
                     }
                 }
             }
index 1221e47..226d81b 100644 (file)
@@ -155,15 +155,14 @@ class ConnectionMigrator
                 $this->getChangedFieldUpdateSuggestions($schemaDiff),
                 $this->getChangedTableOptions($schemaDiff)
             );
                 $this->getChangedFieldUpdateSuggestions($schemaDiff),
                 $this->getChangedTableOptions($schemaDiff)
             );
-        } else {
-            return array_merge_recursive(
+        }
+        return array_merge_recursive(
                 ['change' => [], 'change_table' => [], 'drop' => [], 'drop_table' => [], 'tables_count' => []],
                 $this->getUnusedFieldUpdateSuggestions($schemaDiff),
                 $this->getUnusedTableUpdateSuggestions($schemaDiff),
                 $this->getDropTableUpdateSuggestions($schemaDiff),
                 $this->getDropFieldUpdateSuggestions($schemaDiff)
             );
                 ['change' => [], 'change_table' => [], 'drop' => [], 'drop_table' => [], 'tables_count' => []],
                 $this->getUnusedFieldUpdateSuggestions($schemaDiff),
                 $this->getUnusedTableUpdateSuggestions($schemaDiff),
                 $this->getDropTableUpdateSuggestions($schemaDiff),
                 $this->getDropFieldUpdateSuggestions($schemaDiff)
             );
-        }
     }
 
     /**
     }
 
     /**
@@ -1071,9 +1070,8 @@ class ConnectionMigrator
 
         if (is_string($nameLengthRestrictions)) {
             return $this->getTableAndFieldNameMaxLengths($nameLengthRestrictions);
 
         if (is_string($nameLengthRestrictions)) {
             return $this->getTableAndFieldNameMaxLengths($nameLengthRestrictions);
-        } else {
-            return $nameLengthRestrictions;
         }
         }
+        return $nameLengthRestrictions;
     }
 
     /**
     }
 
     /**
index 6cfdcb9..bdb94c1 100644 (file)
@@ -110,8 +110,8 @@ class ErrorHandler implements ErrorHandlerInterface
                 die($message);
             }
             throw new Exception($message, 1476107295);
                 die($message);
             }
             throw new Exception($message, 1476107295);
-        } else {
-            switch ($errorLevel) {
+        }
+        switch ($errorLevel) {
                 case E_USER_ERROR:
                 case E_RECOVERABLE_ERROR:
                     $severity = 2;
                 case E_USER_ERROR:
                 case E_RECOVERABLE_ERROR:
                     $severity = 2;
@@ -123,51 +123,49 @@ class ErrorHandler implements ErrorHandlerInterface
                 default:
                     $severity = 0;
             }
                 default:
                     $severity = 0;
             }
-            $logTitle = 'Core: Error handler (' . TYPO3_MODE . ')';
-            $message = $logTitle . ': ' . $message;
-            // Write error message to the configured syslogs,
-            // see: $TYPO3_CONF_VARS['SYS']['systemLog']
-            if ($errorLevel & $GLOBALS['TYPO3_CONF_VARS']['SYS']['syslogErrorReporting']) {
-                GeneralUtility::sysLog($message, 'core', $severity + 1);
-            }
-            // Write error message to devlog extension(s),
-            GeneralUtility::devLog($message, 'core', $severity + 1);
+        $logTitle = 'Core: Error handler (' . TYPO3_MODE . ')';
+        $message = $logTitle . ': ' . $message;
+        // Write error message to the configured syslogs,
+        // see: $TYPO3_CONF_VARS['SYS']['systemLog']
+        if ($errorLevel & $GLOBALS['TYPO3_CONF_VARS']['SYS']['syslogErrorReporting']) {
+            GeneralUtility::sysLog($message, 'core', $severity + 1);
+        }
+        // Write error message to devlog extension(s),
+        GeneralUtility::devLog($message, 'core', $severity + 1);
 
 
-            // Write error message to TSlog (admin panel)
-            $timeTracker = $this->getTimeTracker();
-            if (is_object($timeTracker)) {
-                $timeTracker->setTSlogMessage($message, $severity + 1);
-            }
-            // Write error message to sys_log table (ext: belog, Tools->Log)
-            if ($errorLevel & $GLOBALS['TYPO3_CONF_VARS']['SYS']['belogErrorReporting']) {
-                // Silently catch in case an error occurs before a database connection exists.
-                try {
-                    $this->writeLog($message, $severity);
-                } catch (\Exception $e) {
-                }
+        // Write error message to TSlog (admin panel)
+        $timeTracker = $this->getTimeTracker();
+        if (is_object($timeTracker)) {
+            $timeTracker->setTSlogMessage($message, $severity + 1);
+        }
+        // Write error message to sys_log table (ext: belog, Tools->Log)
+        if ($errorLevel & $GLOBALS['TYPO3_CONF_VARS']['SYS']['belogErrorReporting']) {
+            // Silently catch in case an error occurs before a database connection exists.
+            try {
+                $this->writeLog($message, $severity);
+            } catch (\Exception $e) {
             }
             }
-            if ($severity === 2) {
-                // Let the internal handler continue. This will stop the script
-                return false;
-            } else {
-                if ($this->debugMode) {
-                    /** @var $flashMessage \TYPO3\CMS\Core\Messaging\FlashMessage */
-                    $flashMessage = GeneralUtility::makeInstance(
+        }
+        if ($severity === 2) {
+            // Let the internal handler continue. This will stop the script
+            return false;
+        }
+        if ($this->debugMode) {
+            /** @var $flashMessage \TYPO3\CMS\Core\Messaging\FlashMessage */
+            $flashMessage = GeneralUtility::makeInstance(
                         \TYPO3\CMS\Core\Messaging\FlashMessage::class,
                         $message,
                         'PHP ' . $errorLevels[$errorLevel],
                         $severity
                     );
                         \TYPO3\CMS\Core\Messaging\FlashMessage::class,
                         $message,
                         'PHP ' . $errorLevels[$errorLevel],
                         $severity
                     );
-                    /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
-                    $flashMessageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class);
-                    /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
-                    $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
-                    $defaultFlashMessageQueue->enqueue($flashMessage);
-                }
-                // Don't execute PHP internal error handler
-                return true;
-            }
+            /** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
+            $flashMessageService = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessageService::class);
+            /** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
+            $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
+            $defaultFlashMessageQueue->enqueue($flashMessage);
         }
         }
+        // Don't execute PHP internal error handler
+        return true;
     }
 
     /**
     }
 
     /**
index 023ca88..3b3522d 100644 (file)
@@ -115,9 +115,8 @@ class ProductionExceptionHandler extends AbstractExceptionHandler
     {
         if ($this->discloseExceptionInformation($exception) && method_exists($exception, 'getTitle') && $exception->getTitle() !== '') {
             return $exception->getTitle();
     {
         if ($this->discloseExceptionInformation($exception) && method_exists($exception, 'getTitle') && $exception->getTitle() !== '') {
             return $exception->getTitle();
-        } else {
-            return $this->defaultTitle;
         }
         }
+        return $this->defaultTitle;
     }
 
     /**
     }
 
     /**
@@ -130,8 +129,7 @@ class ProductionExceptionHandler extends AbstractExceptionHandler
     {
         if ($this->discloseExceptionInformation($exception)) {
             return $exception->getMessage();
     {
         if ($this->discloseExceptionInformation($exception)) {
             return $exception->getMessage();
-        } else {
-            return $this->defaultMessage;
         }
         }
+        return $this->defaultMessage;
     }
 }
     }
 }
index b3babf0..65a155e 100644 (file)
@@ -78,10 +78,9 @@ class ExtDirectApi
                                }
                                Ext.apply(Ext.app.ExtDirectAPI, ' . json_encode($javascriptNamespaces) . ');
                        ';
                                }
                                Ext.apply(Ext.app.ExtDirectAPI, ' . json_encode($javascriptNamespaces) . ');
                        ';
-        } else {
-            $errorMessage = $this->getNamespaceError($filterNamespaces);
-            throw new \InvalidArgumentException($errorMessage, 1297645190);
         }
         }
+        $errorMessage = $this->getNamespaceError($filterNamespaces);
+        throw new \InvalidArgumentException($errorMessage, 1297645190);
     }
 
     /**
     }
 
     /**
index 1d114b4..02bee07 100644 (file)
@@ -151,9 +151,8 @@ class Message implements MessageInterface
         $headerValue = $this->headers[$header];
         if (is_array($headerValue)) {
             return $headerValue;
         $headerValue = $this->headers[$header];
         if (is_array($headerValue)) {
             return $headerValue;
-        } else {
-            return [$headerValue];
         }
         }
+        return [$headerValue];
     }
 
     /**
     }
 
     /**
index 9036120..a1dda68 100644 (file)
@@ -356,10 +356,9 @@ class ServerRequest extends Request implements ServerRequestInterface
         $clonedObject = clone $this;
         if (!isset($clonedObject->attributes[$name])) {
             return $clonedObject;
         $clonedObject = clone $this;
         if (!isset($clonedObject->attributes[$name])) {
             return $clonedObject;
-        } else {
-            unset($clonedObject->attributes[$name]);
-            return $clonedObject;
         }
         }
+        unset($clonedObject->attributes[$name]);
+        return $clonedObject;
     }
 
     /**
     }
 
     /**
index ecef077..7b7e9e6 100644 (file)
@@ -157,7 +157,8 @@ class ServerRequestFactory
                 }
             }
             return $files;
                 }
             }
             return $files;
-        } elseif (!empty($value['tmp_name'])) {
+        }
+        if (!empty($value['tmp_name'])) {
             return new UploadedFile($value['tmp_name'], $value['size'], $value['error'], $value['name'], $value['type']);
         }
         return null;
             return new UploadedFile($value['tmp_name'], $value['size'], $value['error'], $value['name'], $value['type']);
         }
         return null;
index bf8cdb9..253646b 100644 (file)
@@ -928,25 +928,23 @@ class GraphicalFunctions
             // If any kind of spacing applys, we use this function:
             if ($spacing || $wordSpacing) {
                 return $conf['fontSize'];
             // If any kind of spacing applys, we use this function:
             if ($spacing || $wordSpacing) {
                 return $conf['fontSize'];
-            } else {
-                do {
-                    // Determine bounding box.
-                    $bounds = $this->ImageTTFBBoxWrapper($conf['fontSize'], $conf['angle'], $conf['fontFile'], $conf['text'], $conf['splitRendering.']);
-                    if ($conf['angle'] < 0) {
-                        $pixelWidth = abs($bounds[4] - $bounds[0]);
-                    } elseif ($conf['angle'] > 0) {
-                        $pixelWidth = abs($bounds[2] - $bounds[6]);
-                    } else {
-                        $pixelWidth = abs($bounds[4] - $bounds[6]);
-                    }
-                    // Size is fine, exit:
-                    if ($pixelWidth <= $maxWidth) {
-                        break;
-                    } else {
-                        $conf['fontSize']--;
-                    }
-                } while ($conf['fontSize'] > 1);
             }
             }
+            do {
+                // Determine bounding box.
+                $bounds = $this->ImageTTFBBoxWrapper($conf['fontSize'], $conf['angle'], $conf['fontFile'], $conf['text'], $conf['splitRendering.']);
+                if ($conf['angle'] < 0) {
+                    $pixelWidth = abs($bounds[4] - $bounds[0]);
+                } elseif ($conf['angle'] > 0) {
+                    $pixelWidth = abs($bounds[2] - $bounds[6]);
+                } else {
+                    $pixelWidth = abs($bounds[4] - $bounds[6]);
+                }
+                // Size is fine, exit:
+                if ($pixelWidth <= $maxWidth) {
+                    break;
+                }
+                $conf['fontSize']--;
+            } while ($conf['fontSize'] > 1);
         }
         return $conf['fontSize'];
     }
         }
         return $conf['fontSize'];
     }
@@ -2205,16 +2203,15 @@ class GraphicalFunctions
         if (file_exists($imageFile) && GeneralUtility::inList($this->imageFileExt, strtolower($reg[0]))) {
             if ($returnArr = $this->getCachedImageDimensions($imageFile)) {
                 return $returnArr;
         if (file_exists($imageFile) && GeneralUtility::inList($this->imageFileExt, strtolower($reg[0]))) {
             if ($returnArr = $this->getCachedImageDimensions($imageFile)) {
                 return $returnArr;
+            }
+            if ($temp = @getimagesize($imageFile)) {
+                $returnArr = [$temp[0], $temp[1], strtolower($reg[0]), $imageFile];
             } else {
             } else {
-                if ($temp = @getimagesize($imageFile)) {
-                    $returnArr = [$temp[0], $temp[1], strtolower($reg[0]), $imageFile];
-                } else {
-                    $returnArr = $this->imageMagickIdentify($imageFile);
-                }
-                if ($returnArr) {
-                    $this->cacheImageDimensions($returnArr);
-                    return $returnArr;
-                }
+                $returnArr = $this->imageMagickIdentify($imageFile);
+            }
+            if ($returnArr) {
+                $this->cacheImageDimensions($returnArr);
+                return $returnArr;
             }
         }
         return null;
             }
         }
         return null;
@@ -2668,9 +2665,8 @@ class GraphicalFunctions
     {
         if ($type === 'ai' || $w * $h < $this->pixelLimitGif) {
             return $this->gifExtension;
     {
         if ($type === 'ai' || $w * $h < $this->pixelLimitGif) {
             return $this->gifExtension;
-        } else {
-            return 'jpg';
         }
         }
+        return 'jpg';
     }
 
     /**
     }
 
     /**
index 5e61768..d3d4a8a 100644 (file)
@@ -3467,8 +3467,7 @@ class IconRegistry implements SingletonInterface
     {
         if (StringUtility::endsWith(strtolower($iconReference), 'svg')) {
             return SvgIconProvider::class;
     {
         if (StringUtility::endsWith(strtolower($iconReference), 'svg')) {
             return SvgIconProvider::class;
-        } else {
-            return BitmapIconProvider::class;
         }
         }
+        return BitmapIconProvider::class;
     }
 }
     }
 }
index 7b96db8..df6e16c 100644 (file)
@@ -179,8 +179,7 @@ class Area
     {
         if ($this->isEmpty()) {
             return '';
     {
         if ($this->isEmpty()) {
             return '';
-        } else {
-            return json_encode($this->asArray());
         }
         }
+        return json_encode($this->asArray());
     }
 }
     }
 }
index 949dde5..10a3cf9 100644 (file)
@@ -129,9 +129,8 @@ class CropVariantCollection
     {
         if (isset($this->cropVariants[$id])) {
             return $this->cropVariants[$id]->getCropArea();
     {
         if (isset($this->cropVariants[$id])) {
             return $this->cropVariants[$id]->getCropArea();
-        } else {
-            return Area::createEmpty();
         }
         }
+        return Area::createEmpty();
     }
 
     /**
     }
 
     /**
@@ -142,9 +141,8 @@ class CropVariantCollection
     {
         if (isset($this->cropVariants[$id]) && $this->cropVariants[$id]->getFocusArea() !== null) {
             return $this->cropVariants[$id]->getFocusArea();
     {
         if (isset($this->cropVariants[$id]) && $this->cropVariants[$id]->getFocusArea() !== null) {
             return $this->cropVariants[$id]->getFocusArea();
-        } else {
-            return Area::createEmpty();
         }
         }
+        return Area::createEmpty();
     }
 
     /**
     }
 
     /**
index 890fd7c..d61ceed 100644 (file)
@@ -276,9 +276,8 @@ class DatabaseIntegrityCheck
                 ->getConnectionForTable($table)
                 ->update($table, $updateFields, ['uid' => (int)$uid]);
             return true;
                 ->getConnectionForTable($table)
                 ->update($table, $updateFields, ['uid' => (int)$uid]);
             return true;
-        } else {
-            return false;
         }
         }
+        return false;
     }
 
     /**
     }
 
     /**
index 5a525e0..4c67cff 100644 (file)
@@ -146,7 +146,8 @@ class LinkService implements SingletonInterface
     {
         if (is_object($this->handlers[$parameters['type']])) {
             return $this->handlers[$parameters['type']]->asString($parameters);
     {
         if (is_object($this->handlers[$parameters['type']])) {
             return $this->handlers[$parameters['type']]->asString($parameters);
-        } elseif (isset($parameters['url']) && !empty($parameters['url'])) {
+        }
+        if (isset($parameters['url']) && !empty($parameters['url'])) {
             // This usually happens for tel: or other types where a URL is available and the
             // legacy link service could resolve at least something
             return $parameters['url'];
             // This usually happens for tel: or other types where a URL is available and the
             // legacy link service could resolve at least something
             return $parameters['url'];
index 8865e40..2f28450 100644 (file)
@@ -288,10 +288,9 @@ class LanguageService
         // Return value if not global is set.
         if (!$setGlobal) {
             return $globalLanguage;
         // Return value if not global is set.
         if (!$setGlobal) {
             return $globalLanguage;
-        } else {
-            $GLOBALS['LOCAL_LANG'] = $globalLanguage;
-            return null;
         }
         }
+        $GLOBALS['LOCAL_LANG'] = $globalLanguage;
+        return null;
     }
 
     /**
     }
 
     /**
index 728e4f1..f3f0a84 100644 (file)
@@ -199,9 +199,8 @@ class LanguageStore implements \TYPO3\CMS\Core\SingletonInterface
     {
         if (isset($this->configuration[$fileReference]['parserClass']) && trim($this->configuration[$fileReference]['parserClass']) !== '') {
             return GeneralUtility::makeInstance((string)$this->configuration[$fileReference]['parserClass']);
     {
         if (isset($this->configuration[$fileReference]['parserClass']) && trim($this->configuration[$fileReference]['parserClass']) !== '') {
             return GeneralUtility::makeInstance((string)$this->configuration[$fileReference]['parserClass']);
-        } else {
-            throw new InvalidParserException(sprintf('Invalid parser configuration for the current file (%s)', $fileReference), 1307293692);
         }
         }
+        throw new InvalidParserException(sprintf('Invalid parser configuration for the current file (%s)', $fileReference), 1307293692);
     }
 
     /**
     }
 
     /**
@@ -215,9 +214,8 @@ class LanguageStore implements \TYPO3\CMS\Core\SingletonInterface
     {
         if (isset($this->configuration[$fileReference]['fileReference']) && trim($this->configuration[$fileReference]['fileReference']) !== '') {
             return (string)$this->configuration[$fileReference]['fileReference'];
     {
         if (isset($this->configuration[$fileReference]['fileReference']) && trim($this->configuration[$fileReference]['fileReference']) !== '') {
             return (string)$this->configuration[$fileReference]['fileReference'];
-        } else {
-            throw new \InvalidArgumentException(sprintf('Invalid file reference configuration for the current file (%s)', $fileReference), 1307293693);
         }
         }
+        throw new \InvalidArgumentException(sprintf('Invalid file reference configuration for the current file (%s)', $fileReference), 1307293693);
     }
 
     /**
     }
 
     /**
index 56d7788..ae3d9be 100644 (file)
@@ -255,11 +255,11 @@ class Rfc822AddressesParser
         if ($is_group && $address[0] === ',') {
             $address = trim(substr($address, 1));
             return $address;
         if ($is_group && $address[0] === ',') {
             $address = trim(substr($address, 1));
             return $address;
-        } elseif ($address !== '') {
+        }
+        if ($address !== '') {
             return $address;
             return $address;
-        } else {
-            return '';
         }
         }
+        return '';
     }
 
     /**
     }
 
     /**
@@ -280,9 +280,8 @@ class Rfc822AddressesParser
         if (count(($parts = explode(':', $string))) > 1) {
             $string2 = $this->_splitCheck($parts, ':');
             return $string2 !== $string;
         if (count(($parts = explode(':', $string))) > 1) {
             $string2 = $this->_splitCheck($parts, ':');
             return $string2 !== $string;
-        } else {
-            return false;
         }
         }
+        return false;
     }
 
     /**
     }
 
     /**
@@ -361,9 +360,8 @@ class Rfc822AddressesParser
         if ($num_angle_start < $num_angle_end) {
             $this->error = 'Invalid address spec. Unmatched quote or bracket (' . $chars . ')';
             return false;
         if ($num_angle_start < $num_angle_end) {
             $this->error = 'Invalid address spec. Unmatched quote or bracket (' . $chars . ')';
             return false;
-        } else {
-            return $num_angle_start > $num_angle_end;
         }
         }
+        return $num_angle_start > $num_angle_end;
     }
 
     /**
     }
 
     /**
index 093819d..e5def1f 100644 (file)
@@ -1843,7 +1843,8 @@ class TcaMigration
                                     . $table . '[\'columns\'][\'' . $fieldName . '\'] has been dropped, the setting'
                                     . ' is no longer supported';
                                 continue;
                                     . $table . '[\'columns\'][\'' . $fieldName . '\'] has been dropped, the setting'
                                     . ' is no longer supported';
                                 continue;
-                            } elseif ($defaultExtrasSetting === 'nowrap') {
+                            }
+                            if ($defaultExtrasSetting === 'nowrap') {
                                 $fieldConfig['config']['wrap'] = 'off';
                                 $this->messages[] = 'The defaultExtras setting \'nowrap\' in TCA table '
                                     . $table . '[\'columns\'][\'' . $fieldName . '\'] has been migrated to TCA table '
                                 $fieldConfig['config']['wrap'] = 'off';
                                 $this->messages[] = 'The defaultExtras setting \'nowrap\' in TCA table '
                                     . $table . '[\'columns\'][\'' . $fieldName . '\'] has been migrated to TCA table '
@@ -1881,7 +1882,8 @@ class TcaMigration
                                         . $table . '[\'types\'][\'' . $typeName . '\'][\'columnsOverrides\'][\'' . $fieldName . '\']'
                                         . ' has been dropped, the setting is no longer supported';
                                     continue;
                                         . $table . '[\'types\'][\'' . $typeName . '\'][\'columnsOverrides\'][\'' . $fieldName . '\']'
                                         . ' has been dropped, the setting is no longer supported';
                                     continue;
-                                } elseif ($defaultExtrasSetting === 'nowrap') {
+                                }
+                                if ($defaultExtrasSetting === 'nowrap') {
                                     $overrideConfig['config']['wrap'] = 'off';
                                     $this->messages[] = 'The defaultExtras setting \'nowrap\' in TCA table '
                                         . $table . '[\'types\'][\'' . $typeName . '\'][\'columnsOverrides\'][\'' . $fieldName . '\']'
                                     $overrideConfig['config']['wrap'] = 'off';
                                     $this->messages[] = 'The defaultExtras setting \'nowrap\' in TCA table '
                                         . $table . '[\'types\'][\'' . $typeName . '\'][\'columnsOverrides\'][\'' . $fieldName . '\']'
index 7d59e6c..b35fd98 100644 (file)
@@ -482,9 +482,8 @@ class PackageManager implements \TYPO3\CMS\Core\SingletonInterface
         $lowercasedComposerName = strtolower($composerName);
         if (isset($this->composerNameToPackageKeyMap[$lowercasedComposerName])) {
             return $this->composerNameToPackageKeyMap[$lowercasedComposerName];
         $lowercasedComposerName = strtolower($composerName);
         if (isset($this->composerNameToPackageKeyMap[$lowercasedComposerName])) {
             return $this->composerNameToPackageKeyMap[$lowercasedComposerName];
-        } else {
-            return $composerName;
         }
         }
+        return $composerName;
     }
 
     /**
     }
 
     /**
@@ -1023,10 +1022,9 @@ class PackageManager implements \TYPO3\CMS\Core\SingletonInterface
         if (isset($manifest->type) && substr($manifest->type, 0, 10) === 'typo3-cms-') {
             $packageKey = basename($packagePath);
             return preg_replace('/[^A-Za-z0-9._-]/', '', $packageKey);
         if (isset($manifest->type) && substr($manifest->type, 0, 10) === 'typo3-cms-') {
             $packageKey = basename($packagePath);
             return preg_replace('/[^A-Za-z0-9._-]/', '', $packageKey);
-        } else {
-            $packageKey = str_replace('/', '.', $manifest->name);
-            return preg_replace('/[^A-Za-z0-9.]/', '', $packageKey);
         }
         }
+        $packageKey = str_replace('/', '.', $manifest->name);
+        return preg_replace('/[^A-Za-z0-9.]/', '', $packageKey);
     }
 
     /**
     }
 
     /**
index 48694b5..4145b75 100644 (file)
@@ -122,9 +122,8 @@ abstract class AbstractFile implements FileInterface
     {
         if ($this->hasProperty($key)) {
             return $this->properties[$key];
     {
         if ($this->hasProperty($key)) {
             return $this->properties[$key];
-        } else {
-            return null;
         }
         }
+        return null;
     }
 
     /**
     }
 
     /**
@@ -537,9 +536,8 @@ abstract class AbstractFile implements FileInterface
     {
         if ($this->deleted) {
             return null;
     {
         if ($this->deleted) {
             return null;
-        } else {
-            return $this->getStorage()->getPublicUrl($this, $relativeToCurrentScript);
         }
         }
+        return $this->getStorage()->getPublicUrl($this, $relativeToCurrentScript);
     }
 
     /**
     }
 
     /**
index 3b06105..9dd7a97 100644 (file)
@@ -65,7 +65,8 @@ class FileCollectionRegistry implements SingletonInterface
             // Return immediately without changing configuration
             if ($this->types[$type] === $className) {
                 return true;
             // Return immediately without changing configuration
             if ($this->types[$type] === $className) {
                 return true;
-            } elseif (!$override) {
+            }
+            if (!$override) {
                 throw new \InvalidArgumentException('FileCollections ' . $type . ' is already registered.', 1391295643);
             }
         }
                 throw new \InvalidArgumentException('FileCollections ' . $type . ' is already registered.', 1391295643);
             }
         }
index 2f77ecb..9fd1da0 100644 (file)
@@ -68,9 +68,8 @@ class DriverRegistry implements \TYPO3\CMS\Core\SingletonInterface
             // Return immediately without changing configuration
             if ($this->drivers[$shortName] === $className) {
                 return true;
             // Return immediately without changing configuration
             if ($this->drivers[$shortName] === $className) {
                 return true;
-            } else {
-                throw new \InvalidArgumentException('Driver ' . $shortName . ' is already registered.', 1314979451);
             }
             }
+            throw new \InvalidArgumentException('Driver ' . $shortName . ' is already registered.', 1314979451);
         }
         $this->drivers[$shortName] = $className;
         $this->driverConfigurations[$shortName] = [
         }
         $this->drivers[$shortName] = $className;
         $this->driverConfigurations[$shortName] = [
index b453616..56b0654 100644 (file)
@@ -410,7 +410,8 @@ class LocalDriver extends AbstractHierarchicalFilesystemDriver
                 // If calling the method succeeded and thus we can't use that as a return value.
                 if ($result === -1) {
                     return false;
                 // If calling the method succeeded and thus we can't use that as a return value.
                 if ($result === -1) {
                     return false;
-                } elseif ($result === false) {
+                }
+                if ($result === false) {
                     throw new \RuntimeException(
                         'Could not apply file/folder name filter ' . $filter[0] . '::' . $filter[1],
                         1476046425
                     throw new \RuntimeException(
                         'Could not apply file/folder name filter ' . $filter[0] . '::' . $filter[1],
                         1476046425
@@ -1239,9 +1240,8 @@ class LocalDriver extends AbstractHierarchicalFilesystemDriver
     {
         if ($writable === false) {
             return $this->getAbsolutePath($fileIdentifier);
     {
         if ($writable === false) {
             return $this->getAbsolutePath($fileIdentifier);
-        } else {
-            return $this->copyFileToTemporaryPath($fileIdentifier);
         }
         }
+        return $this->copyFileToTemporaryPath($fileIdentifier);
     }
 
     /**
     }
 
     /**
@@ -1413,11 +1413,11 @@ class LocalDriver extends AbstractHierarchicalFilesystemDriver
             $recycleDirectory = $searchDirectory . '/' . $recyclerSubdirectory;
             if (is_dir($recycleDirectory)) {
                 return $recycleDirectory;
             $recycleDirectory = $searchDirectory . '/' . $recyclerSubdirectory;
             if (is_dir($recycleDirectory)) {
                 return $recycleDirectory;
-            } elseif ($searchDirectory === $rootDirectory) {
+            }
+            if ($searchDirectory === $rootDirectory) {
                 return '';
                 return '';
-            } else {
-                $searchDirectory = PathUtility::dirname($searchDirectory);
             }
             }
+            $searchDirectory = PathUtility::dirname($searchDirectory);
         }
 
         return '';
         }
 
         return '';
index c6339be..3af1e4d 100644 (file)
@@ -79,10 +79,9 @@ class File extends AbstractFile
     {
         if (parent::hasProperty($key)) {
             return parent::getProperty($key);
     {
         if (parent::hasProperty($key)) {
             return parent::getProperty($key);
-        } else {
-            $metaData = $this->_getMetaData();
-            return isset($metaData[$key]) ? $metaData[$key] : null;
         }
         }
+        $metaData = $this->_getMetaData();
+        return isset($metaData[$key]) ? $metaData[$key] : null;
     }
 
     /**
     }
 
     /**
@@ -366,9 +365,8 @@ class File extends AbstractFile
     {
         if ($this->isMissing() || $this->deleted) {
             return false;
     {
         if ($this->isMissing() || $this->deleted) {
             return false;
-        } else {
-            return $this->getStorage()->getPublicUrl($this, $relativeToCurrentScript);
         }
         }
+        return $this->getStorage()->getPublicUrl($this, $relativeToCurrentScript);
     }
 
     /**
     }
 
     /**
index ada1f77..54ad856 100644 (file)
@@ -46,9 +46,8 @@ class FileNameFilter
         // Only apply the filter if you want to hide the hidden files
         if (self::$showHiddenFilesAndFolders === false && strpos($itemIdentifier, '/.') !== false) {
             return -1;
         // Only apply the filter if you want to hide the hidden files
         if (self::$showHiddenFilesAndFolders === false && strpos($itemIdentifier, '/.') !== false) {
             return -1;
-        } else {
-            return true;
         }
         }
+        return true;
     }
 
     /**
     }
 
     /**
index 4bff351..41ea48e 100644 (file)
@@ -55,11 +55,11 @@ class ExtractorRegistry implements SingletonInterface
     {
         if (!class_exists($className)) {
             throw new \InvalidArgumentException('The class "' . $className . '" you are registering is not available', 1422705270);
     {
         if (!class_exists($className)) {
             throw new \InvalidArgumentException('The class "' . $className . '" you are registering is not available', 1422705270);
-        } elseif (!in_array(ExtractorInterface::class, class_implements($className))) {
+        }
+        if (!in_array(ExtractorInterface::class, class_implements($className))) {
             throw new \InvalidArgumentException('The extractor needs to implement the ExtractorInterface', 1422705271);
             throw new \InvalidArgumentException('The extractor needs to implement the ExtractorInterface', 1422705271);
-        } else {
-            $this->extractors[] = $className;
         }
         }
+        $this->extractors[] = $className;
     }
 
     /**
     }
 
     /**
index 73d1e8f..b5238fa 100644 (file)
@@ -316,9 +316,8 @@ class ProcessedFile extends AbstractFile
     {
         if ($this->usesOriginalFile()) {
             return $this->originalFile->getName();
     {
         if ($this->usesOriginalFile()) {
             return $this->originalFile->getName();
-        } else {
-            return $this->name;
         }
         }
+        return $this->name;
     }
 
     /**
     }
 
     /**
@@ -450,9 +449,8 @@ class ProcessedFile extends AbstractFile
         // The uid always (!) has to come from this file and never the original file (see getOriginalFile() to get this)
         if ($this->isUnchanged() && $key !== 'uid') {
             return $this->originalFile->getProperty($key);
         // The uid always (!) has to come from this file and never the original file (see getOriginalFile() to get this)
         if ($this->isUnchanged() && $key !== 'uid') {
             return $this->originalFile->getProperty($key);
-        } else {
-            return $this->properties[$key];
         }
         }
+        return $this->properties[$key];
     }
 
     /**
     }
 
     /**
@@ -564,10 +562,10 @@ class ProcessedFile extends AbstractFile
     {
         if ($this->deleted) {
             return null;
     {
         if ($this->deleted) {
             return null;
-        } elseif ($this->usesOriginalFile()) {
+        }
+        if ($this->usesOriginalFile()) {
             return $this->getOriginalFile()->getPublicUrl($relativeToCurrentScript);
             return $this->getOriginalFile()->getPublicUrl($relativeToCurrentScript);
-        } else {
-            return $this->getStorage()->getPublicUrl($this, $relativeToCurrentScript);
         }
         }
+        return $this->getStorage()->getPublicUrl($this, $relativeToCurrentScript);
     }
 }
     }
 }
index 2798fb8..465903d 100644 (file)
@@ -128,9 +128,8 @@ class LocalImageProcessor implements ProcessorInterface
             $task->getTargetFile()->updateProperties($properties);
 
             return true;
             $task->getTargetFile()->updateProperties($properties);
 
             return true;
-        } else {
-            return false;
         }
         }
+        return false;
     }
 
     /**
     }
 
     /**
index 6186508..de5f976 100644 (file)
@@ -56,11 +56,11 @@ class RendererRegistry implements \TYPO3\CMS\Core\SingletonInterface
     {
         if (!class_exists($className)) {
             throw new \InvalidArgumentException('The class "' . $className . '" you are trying to register is not available', 1411840171);
     {
         if (!class_exists($className)) {
             throw new \InvalidArgumentException('The class "' . $className . '" you are trying to register is not available', 1411840171);
-        } elseif (!in_array(FileRendererInterface::class, class_implements($className), true)) {
+        }
+        if (!in_array(FileRendererInterface::class, class_implements($className), true)) {
             throw new \InvalidArgumentException('The renderer needs to implement the FileRendererInterface', 1411840172);
             throw new \InvalidArgumentException('The renderer needs to implement the FileRendererInterface', 1411840172);
-        } else {
-            $this->classNames[] = $className;
         }
         }
+        $this->classNames[] = $className;
     }
 
     /**
     }
 
     /**
index e4162db..8c97941 100644 (file)
@@ -470,14 +470,17 @@ class ResourceFactory implements ResourceFactoryInterface, \TYPO3\CMS\Core\Singl
         if (GeneralUtility::isFirstPartOfStr($input, 'file:')) {
             $input = substr($input, 5);
             return $this->retrieveFileOrFolderObject($input);
         if (GeneralUtility::isFirstPartOfStr($input, 'file:')) {
             $input = substr($input, 5);
             return $this->retrieveFileOrFolderObject($input);
-        } elseif (MathUtility::canBeInterpretedAsInteger($input)) {
+        }
+        if (MathUtility::canBeInterpretedAsInteger($input)) {
             return $this->getFileObject($input);
             return $this->getFileObject($input);
-        } elseif (strpos($input, ':') > 0) {
+        }
+        if (strpos($input, ':') > 0) {
             list($prefix) = explode(':', $input);
             if (MathUtility::canBeInterpretedAsInteger($prefix)) {
                 // path or folder in a valid storageUID
                 return $this->getObjectFromCombinedIdentifier($input);
             list($prefix) = explode(':', $input);
             if (MathUtility::canBeInterpretedAsInteger($prefix)) {
                 // path or folder in a valid storageUID
                 return $this->getObjectFromCombinedIdentifier($input);
-            } elseif ($prefix === 'EXT') {
+            }
+            if ($prefix === 'EXT') {
                 $input = GeneralUtility::getFileAbsFileName($input);
                 if (empty($input)) {
                     return null;
                 $input = GeneralUtility::getFileAbsFileName($input);
                 if (empty($input)) {
                     return null;
@@ -485,21 +488,18 @@ class ResourceFactory implements ResourceFactoryInterface, \TYPO3\CMS\Core\Singl
 
                 $input = PathUtility::getRelativePath(PATH_site, PathUtility::dirname($input)) . PathUtility::basename($input);
                 return $this->getFileObjectFromCombinedIdentifier($input);
 
                 $input = PathUtility::getRelativePath(PATH_site, PathUtility::dirname($input)) . PathUtility::basename($input);
                 return $this->getFileObjectFromCombinedIdentifier($input);
-            } else {
-                return null;
-            }
-        } else {
-            // this is a backwards-compatible way to access "0-storage" files or folders
-            // eliminate double slashes, /./ and /../
-            $input = PathUtility::getCanonicalPath(ltrim($input, '/'));
-            if (@is_file(PATH_site . $input)) {
-                // only the local file
-                return $this->getFileObjectFromCombinedIdentifier($input);
-            } else {
-                // only the local path
-                return $this->getFolderObjectFromCombinedIdentifier($input);
             }
             }
+            return null;
+        }
+        // this is a backwards-compatible way to access "0-storage" files or folders
+        // eliminate double slashes, /./ and /../
+        $input = PathUtility::getCanonicalPath(ltrim($input, '/'));
+        if (@is_file(PATH_site . $input)) {
+            // only the local file
+            return $this->getFileObjectFromCombinedIdentifier($input);
         }
         }
+        // only the local path
+        return $this->getFolderObjectFromCombinedIdentifier($input);
     }
 
     /**
     }
 
     /**
@@ -558,11 +558,11 @@ class ResourceFactory implements ResourceFactoryInterface, \TYPO3\CMS\Core\Singl
         $storage = $this->getStorageObject($storageId);
         if ($storage->hasFile($objectIdentifier)) {
             return $storage->getFile($objectIdentifier);
         $storage = $this->getStorageObject($storageId);
         if ($storage->hasFile($objectIdentifier)) {
             return $storage->getFile($objectIdentifier);
-        } elseif ($storage->hasFolder($objectIdentifier)) {
+        }
+        if ($storage->hasFolder($objectIdentifier)) {
             return $storage->getFolder($objectIdentifier);
             return $storage->getFolder($objectIdentifier);
-        } else {
-            throw new Exception\ResourceDoesNotExistException('Object with identifier "' . $identifier . '" does not exist in storage', 1329647780);
         }
         }
+        throw new Exception\ResourceDoesNotExistException('Object with identifier "' . $identifier . '" does not exist in storage', 1329647780);
     }
 
     /**
     }
 
     /**
index 7aa9945..4107be4 100644 (file)
@@ -521,7 +521,8 @@ class ResourceStorage implements ResourceStorageInterface
                     $isWithinFileMount = true;
                     if (!$checkWriteAccess) {
                         break;
                     $isWithinFileMount = true;
                     if (!$checkWriteAccess) {
                         break;
-                    } elseif (empty($fileMount['read_only'])) {
+                    }
+                    if (empty($fileMount['read_only'])) {
                         $writableFileMountAvailable = true;
                         break;
                     }
                         $writableFileMountAvailable = true;
                         break;
                     }
@@ -734,15 +735,14 @@ class ResourceStorage implements ResourceStorageInterface
                 }
                 // If no match we return TRUE
                 return true;
                 }
                 // If no match we return TRUE
                 return true;
-            } else {
-                if ($fileExtensionPermissions['allow'] === '*') {
-                    return true;
-                }
-                if ($fileExtensionPermissions['deny'] === '*') {
-                    return false;
-                }
+            }
+            if ($fileExtensionPermissions['allow'] === '*') {
                 return true;
             }
                 return true;
             }
+            if ($fileExtensionPermissions['deny'] === '*') {
+                return false;
+            }
+            return true;
         }
         return $isAllowed;
     }
         }
         return $isAllowed;
     }
@@ -761,12 +761,11 @@ class ResourceStorage implements ResourceStorageInterface
                     'You are not allowed to read folders',
                     1430657869
                 );
                     'You are not allowed to read folders',
                     1430657869
                 );
-            } else {
-                throw new Exception\InsufficientFolderAccessPermissionsException(
+            }
+            throw new Exception\InsufficientFolderAccessPermissionsException(
                     'You are not allowed to access the given folder: "' . $folder->getName() . '"',
                     1375955684
                 );
                     'You are not allowed to access the given folder: "' . $folder->getName() . '"',
                     1375955684
                 );
-            }
         }
     }
 
         }
     }
 
@@ -1170,7 +1169,8 @@ class ResourceStorage implements ResourceStorageInterface
         $replaceExisting = false;
         if ($conflictMode->equals(DuplicationBehavior::CANCEL) && $this->driver->fileExistsInFolder($targetFileName, $targetFolder->getIdentifier())) {
             throw new Exception\ExistingTargetFileNameException('File "' . $targetFileName . '" already exists in folder ' . $targetFolder->getIdentifier(), 1322121068);
         $replaceExisting = false;
         if ($conflictMode->equals(DuplicationBehavior::CANCEL) && $this->driver->fileExistsInFolder($targetFileName, $targetFolder->getIdentifier())) {
             throw new Exception\ExistingTargetFileNameException('File "' . $targetFileName . '" already exists in folder ' . $targetFolder->getIdentifier(), 1322121068);
-        } elseif ($conflictMode->equals(DuplicationBehavior::RENAME)) {
+        }
+        if ($conflictMode->equals(DuplicationBehavior::RENAME)) {
             $targetFileName = $this->getUniqueName($targetFolder, $targetFileName);
         } elseif ($conflictMode->equals(DuplicationBehavior::REPLACE) && $this->driver->fileExistsInFolder($targetFileName, $targetFolder->getIdentifier())) {
             $replaceExisting = true;
             $targetFileName = $this->getUniqueName($targetFolder, $targetFileName);
         } elseif ($conflictMode->equals(DuplicationBehavior::REPLACE) && $this->driver->fileExistsInFolder($targetFileName, $targetFolder->getIdentifier())) {
             $replaceExisting = true;
@@ -2405,9 +2405,8 @@ class ResourceStorage implements ResourceStorageInterface
         if ($respectFileMounts && !empty($this->fileMounts)) {
             $mount = reset($this->fileMounts);
             return $mount['folder'];
         if ($respectFileMounts && !empty($this->fileMounts)) {
             $mount = reset($this->fileMounts);
             return $mount['folder'];
-        } else {
-            return $this->getResourceFactoryInstance()->createFolderObject($this, $this->driver->getRootLevelFolder(), '');
         }
         }
+        return $this->getResourceFactoryInstance()->createFolderObject($this, $this->driver->getRootLevelFolder(), '');
     }
 
     /**
     }
 
     /**
index df5de9c..a98f7f2 100644 (file)
@@ -240,12 +240,11 @@ class DependencyOrderingService
         foreach (array_filter($graph[$from]) as $node => $_) {
             if ($node === $to) {
                 return [$from, $to];
         foreach (array_filter($graph[$from]) as $node => $_) {
             if ($node === $to) {
                 return [$from, $to];
-            } else {
-                $subPath = $this->findPathInGraph($graph, $node, $to);
-                if (!empty($subPath)) {
-                    array_unshift($subPath, $from);
-                    return $subPath;
-                }
+            }
+            $subPath = $this->findPathInGraph($graph, $node, $to);
+            if (!empty($subPath)) {
+                array_unshift($subPath, $from);
+                return $subPath;
             }
         }
         return [];
             }
         }
         return [];
index 58d95aa..97e1f64 100644 (file)
@@ -376,16 +376,13 @@ class ExtendedTemplateService extends TemplateService
         if ((string)$parts[0] !== '' && is_array($theSetup[$parts[0] . '.'])) {
             if (trim($parts[1]) !== '') {
                 return $this->ext_getSetup($theSetup[$parts[0] . '.'], trim($parts[1]));
         if ((string)$parts[0] !== '' && is_array($theSetup[$parts[0] . '.'])) {
             if (trim($parts[1]) !== '') {
                 return $this->ext_getSetup($theSetup[$parts[0] . '.'], trim($parts[1]));
-            } else {
-                return [$theSetup[$parts[0] . '.'], $theSetup[$parts[0]]];
-            }
-        } else {
-            if (trim($theKey) !== '') {
-                return [[], $theSetup[$theKey]];
-            } else {
-                return [$theSetup, ''];
             }
             }
+            return [$theSetup[$parts[0] . '.'], $theSetup[$parts[0]]];
         }
         }
+        if (trim($theKey) !== '') {
+            return [[], $theSetup[$theKey]];
+        }
+        return [$theSetup, ''];
     }
 
     /**
     }
 
     /**
@@ -763,9 +760,8 @@ class ExtendedTemplateService extends TemplateService
             $tsparser->lineNumberOffset = $this->ext_lineNumberOffset + 1;
             $tsparser->parentObject = $this;
             return $tsparser->doSyntaxHighlight($all, $lineNumbers ? [$this->ext_lineNumberOffset + 1] : '', $syntaxHLBlockmode);
             $tsparser->lineNumberOffset = $this->ext_lineNumberOffset + 1;
             $tsparser->parentObject = $this;
             return $tsparser->doSyntaxHighlight($all, $lineNumbers ? [$this->ext_lineNumberOffset + 1] : '', $syntaxHLBlockmode);
-        } else {
-            return $this->ext_formatTS($all, $lineNumbers, $comments, $crop);
         }
         }
+        return $this->ext_formatTS($all, $lineNumbers, $comments, $crop);
     }
 
     /**
     }
 
     /**
@@ -785,9 +781,8 @@ class ExtendedTemplateService extends TemplateService
                     $string = GeneralUtility::fixed_lgd_cs(substr($string, 12, -12), ($chars - 3));
                     $marker = substr(md5($string), 0, 6);
                     return '##' . $marker . '_B##' . $string . '##' . $marker . '_E##';
                     $string = GeneralUtility::fixed_lgd_cs(substr($string, 12, -12), ($chars - 3));
                     $marker = substr(md5($string), 0, 6);
                     return '##' . $marker . '_B##' . $string . '##' . $marker . '_E##';
-                } else {
-                    return GeneralUtility::fixed_lgd_cs($string, $chars - 3);
                 }
                 }
+                return GeneralUtility::fixed_lgd_cs($string, $chars - 3);
             }
         }
         return $string;
             }
         }
         return $string;
index a5db2e4..00c3255 100644 (file)
@@ -360,7 +360,8 @@ class TypoScriptParser
                         $this->error('Line ' . ($this->lineNumberOffset + $this->rawP - 1) . ': On return to [GLOBAL] scope, the script was short of ' . $this->inBrace . ' end brace(s)', 1);
                         $this->inBrace = 0;
                         return $line;
                         $this->error('Line ' . ($this->lineNumberOffset + $this->rawP - 1) . ': On return to [GLOBAL] scope, the script was short of ' . $this->inBrace . ' end brace(s)', 1);
                         $this->inBrace = 0;
                         return $line;
-                    } elseif ($line[0] !== '}' && $line[0] !== '#' && $line[0] !== '/') {
+                    }
+                    if ($line[0] !== '}' && $line[0] !== '#' && $line[0] !== '/') {
                         // If not brace-end or comment
                         // Find object name string until we meet an operator
                         $varL = strcspn($line, TAB . ' {=<>(');
                         // If not brace-end or comment
                         // Find object name string until we meet an operator
                         $varL = strcspn($line, TAB . ' {=<>(');
@@ -644,11 +645,11 @@ class TypoScriptParser
                 $retArr[1] = $setup[$subKey];
             }
             return $retArr;
                 $retArr[1] = $setup[$subKey];
             }
             return $retArr;
-        } else {
-            if ($setup[$subKey]) {
-                return $this->getVal($remainingKey, $setup[$subKey]);
-            }
         }
         }
+        if ($setup[$subKey]) {
+            return $this->getVal($remainingKey, $setup[$subKey]);
+        }
+
         return [];
     }
 
         return [];
     }
 
index ac2a98b..f2a7930 100644 (file)
@@ -1332,7 +1332,8 @@ class TemplateService
         $file = trim($fileFromSetup);
         if (!$file) {
             return null;
         $file = trim($fileFromSetup);
         if (!$file) {
             return null;
-        } elseif (strpos($file, '../') !== false) {
+        }
+        if (strpos($file, '../') !== false) {
             if ($this->tt_track) {
                 $this->getTimeTracker()->setTSlogMessage('File path "' . $file . '" contained illegal string "../"!', 3);
             }
             if ($this->tt_track) {
                 $this->getTimeTracker()->setTSlogMessage('File path "' . $file . '" contained illegal string "../"!', 3);
             }
index b4d2624..99e4149 100644 (file)
@@ -279,14 +279,14 @@ class GeneralUtility
         $list = trim($list);
         if ($list === '') {
             return false;
         $list = trim($list);
         if ($list === '') {
             return false;
-        } elseif ($list === '*') {
+        }
+        if ($list === '*') {
             return true;
         }
         if (strpos($baseIP, ':') !== false && self::validIPv6($baseIP)) {
             return self::cmpIPv6($baseIP, $list);
             return true;
         }
         if (strpos($baseIP, ':') !== false && self::validIPv6($baseIP)) {
             return self::cmpIPv6($baseIP, $list);
-        } else {
-            return self::cmpIPv4($baseIP, $list);
         }
         }
+        return self::cmpIPv4($baseIP, $list);
     }
 
     /**
     }
 
     /**
@@ -582,9 +582,8 @@ class GeneralUtility
                         if ($wildcardMatched) {
                             // Match found by recursive compare
                             return true;
                         if ($wildcardMatched) {
                             // Match found by recursive compare
                             return true;
-                        } else {
-                            $yes = false;
                         }
                         }
+                        $yes = false;
                     }
                 } elseif ($baseHostNameParts[$index] !== $val) {
                     // In case of no match
                     }
                 } elseif ($baseHostNameParts[$index] !== $val) {
                     // In case of no match
@@ -933,13 +932,12 @@ class GeneralUtility
     {
         if (isset(self::$idnaStringCache[$value])) {
             return self::$idnaStringCache[$value];
     {
         if (isset(self::$idnaStringCache[$value])) {
             return self::$idnaStringCache[$value];
-        } else {
-            if (!self::$idnaConverter) {
-                self::$idnaConverter = new \Mso\IdnaConvert\IdnaConvert(['idn_version' => 2008]);
-            }
-            self::$idnaStringCache[$value] = self::$idnaConverter->encode($value);
-            return self::$idnaStringCache[$value];
         }
         }
+        if (!self::$idnaConverter) {
+            self::$idnaConverter = new \Mso\IdnaConvert\IdnaConvert(['idn_version' => 2008]);
+        }
+        self::$idnaStringCache[$value] = self::$idnaConverter->encode($value);
+        return self::$idnaStringCache[$value];
     }
 
     /**
     }
 
     /**
@@ -1091,16 +1089,15 @@ class GeneralUtility
             $position = strrpos($string, strrev($delimiter));
             if ($position !== false) {
                 return [substr($string, 0, $position), substr($string, $position + strlen($delimiter))];
             $position = strrpos($string, strrev($delimiter));
             if ($position !== false) {
                 return [substr($string, 0, $position), substr($string, $position + strlen($delimiter))];
-            } else {
-                return [$string];
             }
             }
-        } elseif ($count <= 1) {
             return [$string];
             return [$string];
-        } else {
-            $explodedValues = explode($delimiter, strrev($string), $count);
-            $explodedValues = array_map('strrev', $explodedValues);
-            return array_reverse($explodedValues);
         }
         }
+        if ($count <= 1) {
+            return [$string];
+        }
+        $explodedValues = explode($delimiter, strrev($string), $count);
+        $explodedValues = array_map('strrev', $explodedValues);
+        return array_reverse($explodedValues);
     }
 
     /**
     }
 
     /**
@@ -3041,9 +3038,8 @@ class GeneralUtility
         if ((string)$filename !== '' && static::validPathStr($filename)) {
             // checks backpath.
             return $filename;
         if ((string)$filename !== '' && static::validPathStr($filename)) {
             // checks backpath.
             return $filename;
-        } else {
-            return '';
         }
         }
+        return '';
     }
 
     /**
     }
 
     /**
@@ -3736,24 +3732,24 @@ class GeneralUtility
                 // reset service and return object
                 $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']]->reset();
                 return $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']];
                 // reset service and return object
                 $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']]->reset();
                 return $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']];
-            } else {
-                $obj = self::makeInstance($info['className']);
-                if (is_object($obj)) {
-                    if (!@is_callable([$obj, 'init'])) {
-                        // use silent logging??? I don't think so.
-                        die('Broken service:' . DebugUtility::viewArray($info));
-                    }
-                    $obj->info = $info;
-                    // service available?
-                    if ($obj->init()) {
-                        // create persistent object
-                        $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']] = $obj;
-                        return $obj;
-                    }
-                    $error = $obj->getLastErrorArray();
-                    unset($obj);
+            }
+            $obj = self::makeInstance($info['className']);
+            if (is_object($obj)) {
+                if (!@is_callable([$obj, 'init'])) {
+                    // use silent logging??? I don't think so.
+                    die('Broken service:' . DebugUtility::viewArray($info));
                 }
                 }
+                $obj->info = $info;
+                // service available?
+                if ($obj->init()) {
+                    // create persistent object
+                    $GLOBALS['T3_VAR']['makeInstanceService'][$info['className']] = $obj;
+                    return $obj;
+                }
+                $error = $obj->getLastErrorArray();
+                unset($obj);
             }
             }
+
             // deactivate the service
             ExtensionManagementUtility::deactivateService($info['serviceType'], $info['serviceKey']);
         }
             // deactivate the service
             ExtensionManagementUtility::deactivateService($info['serviceType'], $info['serviceKey']);
         }
index c564d46..5d47524 100644 (file)
@@ -35,11 +35,11 @@ class MailUtility
         $name = self::getSystemFromName();
         if (!$address) {
             return null;
         $name = self::getSystemFromName();
         if (!$address) {
             return null;
-        } elseif ($name) {
+        }
+        if ($name) {
             return [$address => $name];
             return [$address => $name];
-        } else {
-            return [$address];
         }
         }
+        return [$address];
     }
 
     /**
     }
 
     /**
@@ -53,9 +53,8 @@ class MailUtility
     {
         if ($GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']) {
             return $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'];
     {
         if ($GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']) {
             return $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'];
-        } else {
-            return null;
         }
         }
+        return null;
     }
 
     /**
     }
 
     /**
index 3635876..51a0b4a 100644 (file)
@@ -177,9 +177,9 @@ class MathUtility
                 $value = self::calculateWithPriorityToAdditionAndSubtraction(substr($string, 0, $valueLenC));
                 $string = $value . substr($string, ($valueLenC + 1));
                 return $string;
                 $value = self::calculateWithPriorityToAdditionAndSubtraction(substr($string, 0, $valueLenC));
                 $string = $value . substr($string, ($valueLenC + 1));
                 return $string;
-            } else {
-                $string = substr($string, 0, $valueLenO) . self::calculateWithParentheses(substr($string, ($valueLenO + 1)));
             }
             }
+            $string = substr($string, 0, $valueLenO) . self::calculateWithParentheses(substr($string, ($valueLenO + 1)));
+
             // Security:
             $securC--;
             if ($securC <= 0) {
             // Security:
             $securC--;
             if ($securC <= 0) {
index a182cb5..5dba704 100644 (file)
@@ -148,9 +148,8 @@ class RootlineUtility
         if ($this->mountPointParameter !== '') {
             if (!$GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids']) {
                 throw new \RuntimeException('Mount-Point Pages are disabled for this installation. Cannot resolve a Rootline for a page with Mount-Points', 1343462896);
         if ($this->mountPointParameter !== '') {
             if (!$GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids']) {
                 throw new \RuntimeException('Mount-Point Pages are disabled for this installation. Cannot resolve a Rootline for a page with Mount-Points', 1343462896);
-            } else {
-                $this->parseMountPointParameter();
             }
             }
+            $this->parseMountPointParameter();
         }
         if (self::$cache === null) {
             self::$cache = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class)->getCache('cache_rootline');
         }
         if (self::$cache === null) {
             self::$cache = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class)->getCache('cache_rootline');
index ee32d0e..0e37ddc 100644 (file)
@@ -345,7 +345,8 @@ class HookTest extends AbstractDataHandlerActionTestCase
             $rightValue = $right[$key] ?? null;
             if (!is_array($leftValue) && (string)$leftValue !== (string)$rightValue) {
                 return false;
             $rightValue = $right[$key] ?? null;
             if (!is_array($leftValue) && (string)$leftValue !== (string)$rightValue) {
                 return false;
-            } elseif (is_array($leftValue)) {
+            }
+            if (is_array($leftValue)) {
                 if (!$this->equals($leftValue, $rightValue)) {
                     return false;
                 }
                 if (!$this->equals($leftValue, $rightValue)) {
                     return false;
                 }
index 9e3c6b1..d14c00e 100644 (file)
@@ -34,8 +34,7 @@ class DataStructureParsePreProcessHookReturnString
                     <sheets></sheets>
                 </T3DataStructure>
             ';
                     <sheets></sheets>
                 </T3DataStructure>
             ';
-        } else {
-            return '';
         }
         }
+        return '';
     }
 }
     }
 }
index 0feedcf..57a1cab 100644 (file)
@@ -33,8 +33,7 @@ class LocalDriverFilenameFilter
     {
         if ($itemName === 'fileA' || $itemName === 'folderA/') {
             return -1;
     {
         if ($itemName === 'fileA' || $itemName === 'folderA/') {
             return -1;
-        } else {
-            return true;
         }
         }
+        return true;
     }
 }
     }
 }
index 930ca31..30c9db4 100644 (file)
@@ -120,17 +120,17 @@ class DocumentationService
                 $success |= $this->fetchDocument($url, $key, $version, $language);
                 // Fetch next language
                 continue;
                 $success |= $this->fetchDocument($url, $key, $version, $language);
                 // Fetch next language
                 continue;
-            } else {
-                if (isset($packages[$version])) {
-                    foreach ($packages[$version] as $locale => $_) {
-                        if (GeneralUtility::isFirstPartOfStr($locale, $language)) {
-                            $success |= $this->fetchDocument($url, $key, $version, $locale);
-                            // Fetch next language (jump current foreach up to the loop of $languages)
-                            continue 2;
-                        }
+            }
+            if (isset($packages[$version])) {
+                foreach ($packages[$version] as $locale => $_) {
+                    if (GeneralUtility::isFirstPartOfStr($locale, $language)) {
+                        $success |= $this->fetchDocument($url, $key, $version, $locale);
+                        // Fetch next language (jump current foreach up to the loop of $languages)
+                        continue 2;
                     }
                 }
             }
                     }
                 }
             }
+
             // Step 2)
             if (preg_match('/^(\d+\.\d+)\.\d+$/', $version, $matches)) {
                 // Instead of a 3-digit version, try to get it on 2 digits
             // Step 2)
             if (preg_match('/^(\d+\.\d+)\.\d+$/', $version, $matches)) {
                 // Instead of a 3-digit version, try to get it on 2 digits
index e25cd56..2ff8abf 100644 (file)
@@ -67,9 +67,8 @@ abstract class AbstractDomainObject implements DomainObjectInterface, \TYPO3\CMS
     {
         if ($this->uid !== null) {
             return (int)$this->uid;
     {
         if ($this->uid !== null) {
             return (int)$this->uid;
-        } else {
-            return null;
         }
         }
+        return null;
     }
 
     /**
     }
 
     /**
@@ -95,9 +94,8 @@ abstract class AbstractDomainObject implements DomainObjectInterface, \TYPO3\CMS
     {
         if ($this->pid === null) {
             return null;
     {
         if ($this->pid === null) {
             return null;
-        } else {
-            return (int)$this->pid;
         }
         }
+        return (int)$this->pid;
     }
 
     /**
     }
 
     /**
index 419fb4d..9769ad1 100644 (file)
@@ -127,9 +127,8 @@ class Message
     {
         if (!empty($this->arguments)) {
             return vsprintf($this->message, $this->arguments);
     {
         if (!empty($this->arguments)) {
             return vsprintf($this->message, $this->arguments);
-        } else {
-            return $this->message;
         }
         }
+        return $this->message;
     }
 
     /**
     }
 
     /**
index e295791..e13efb9 100644 (file)
@@ -293,9 +293,8 @@ class Argument
     {
         if ($this->value === null) {
             return $this->defaultValue;
     {
         if ($this->value === null) {
             return $this->defaultValue;
-        } else {
-            return $this->value;
         }
         }
+        return $this->value;
     }
 
     /**
     }
 
     /**
index 6659fc4..c132eac 100644 (file)
@@ -281,11 +281,11 @@ class JsonView extends AbstractView
                 }
             }
             return $array;
                 }
             }
             return $array;
-        } elseif (is_object($value)) {
+        }
+        if (is_object($value)) {
             return $this->transformObject($value, $configuration);
             return $this->transformObject($value, $configuration);
-        } else {
-            return $value;
         }
         }
+        return $value;
     }
 
     /**
     }
 
     /**
@@ -300,41 +300,40 @@ class JsonView extends AbstractView
     {
         if ($object instanceof \DateTime) {
             return $object->format(\DateTime::ATOM);
     {
         if ($object instanceof \DateTime) {
             return $object->format(\DateTime::ATOM);
-        } else {
-            $propertyNames = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getGettablePropertyNames($object);
+        }
+        $propertyNames = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getGettablePropertyNames($object);
 
 
-            $propertiesToRender = [];
-            foreach ($propertyNames as $propertyName) {
-                if (isset($configuration['_only']) && is_array($configuration['_only']) && !in_array($propertyName, $configuration['_only'])) {
-                    continue;
-                }
-                if (isset($configuration['_exclude']) && is_array($configuration['_exclude']) && in_array($propertyName, $configuration['_exclude'])) {
-                    continue;
-                }
+        $propertiesToRender = [];
+        foreach ($propertyNames as $propertyName) {
+            if (isset($configuration['_only']) && is_array($configuration['_only']) && !in_array($propertyName, $configuration['_only'])) {
+                continue;
+            }
+            if (isset($configuration['_exclude']) && is_array($configuration['_exclude']) && in_array($propertyName, $configuration['_exclude'])) {
+                continue;
+            }
 
 
-                $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($object, $propertyName);
+            $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getProperty($object, $propertyName);
 
 
-                if (!is_array($propertyValue) && !is_object($propertyValue)) {
-                    $propertiesToRender[$propertyName] = $propertyValue;
-                } elseif (isset($configuration['_descend']) && array_key_exists($propertyName, $configuration['_descend'])) {
-                    $propertiesToRender[$propertyName] = $this->transformValue($propertyValue, $configuration['_descend'][$propertyName]);
-                }
+            if (!is_array($propertyValue) && !is_object($propertyValue)) {
+                $propertiesToRender[$propertyName] = $propertyValue;
+            } elseif (isset($configuration['_descend']) && array_key_exists($propertyName, $configuration['_descend'])) {
+                $propertiesToRender[$propertyName] = $this->transformValue($propertyValue, $configuration['_descend'][$propertyName]);
             }
             }
-            if (isset($configuration['_exposeObjectIdentifier']) && $configuration['_exposeObjectIdentifier'] === true) {
-                if (isset($configuration['_exposedObjectIdentifierKey']) && strlen($configuration['_exposedObjectIdentifierKey']) > 0) {
-                    $identityKey = $configuration['_exposedObjectIdentifierKey'];
-                } else {
-                    $identityKey = '__identity';
-                }
-                $propertiesToRender[$identityKey] = $this->persistenceManager->getIdentifierByObject($object);
-            }
-            if (isset($configuration['_exposeClassName']) && ($configuration['_exposeClassName'] === self::EXPOSE_CLASSNAME_FULLY_QUALIFIED || $configuration['_exposeClassName'] === self::EXPOSE_CLASSNAME_UNQUALIFIED)) {
-                $className = get_class($object);
-                $classNameParts = explode('\\', $className);
-                $propertiesToRender['__class'] = ($configuration['_exposeClassName'] === self::EXPOSE_CLASSNAME_FULLY_QUALIFIED ? $className : array_pop($classNameParts));
+        }
+        if (isset($configuration['_exposeObjectIdentifier']) && $configuration['_exposeObjectIdentifier'] === true) {
+            if (isset($configuration['_exposedObjectIdentifierKey']) && strlen($configuration['_exposedObjectIdentifierKey']) > 0) {
+                $identityKey = $configuration['_exposedObjectIdentifierKey'];
+            } else {
+                $identityKey = '__identity';
             }
             }
-
-            return $propertiesToRender;
+            $propertiesToRender[$identityKey] = $this->persistenceManager->getIdentifierByObject($object);
         }
         }
+        if (isset($configuration['_exposeClassName']) && ($configuration['_exposeClassName'] === self::EXPOSE_CLASSNAME_FULLY_QUALIFIED || $configuration['_exposeClassName'] === self::EXPOSE_CLASSNAME_UNQUALIFIED)) {
+            $className = get_class($object);
+            $classNameParts = explode('\\', $className);
+            $propertiesToRender['__class'] = ($configuration['_exposeClassName'] === self::EXPOSE_CLASSNAME_FULLY_QUALIFIED ? $className : array_pop($classNameParts));
+        }
+
+        return $propertiesToRender;
     }
 }
     }
 }
index 4da614e..cc74137 100644 (file)
@@ -151,9 +151,8 @@ class Request extends \TYPO3\CMS\Extbase\Mvc\Request
     {
         if ($this->environmentService->isEnvironmentInBackendMode()) {
             return $this->baseUri . TYPO3_mainDir;
     {
         if ($this->environmentService->isEnvironmentInBackendMode()) {
             return $this->baseUri . TYPO3_mainDir;
-        } else {
-            return $this->baseUri;
         }
         }
+        return $this->baseUri;
     }
 
     /**
     }
 
     /**
index 24bc638..10cd7c8 100644 (file)
@@ -208,7 +208,8 @@ class RequestBuilder implements \TYPO3\CMS\Core\SingletonInterface
             $configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
             if (isset($configuration['mvc']['throwPageNotFoundExceptionIfActionCantBeResolved']) && (bool)$configuration['mvc']['throwPageNotFoundExceptionIfActionCantBeResolved']) {
                 throw new \TYPO3\CMS\Core\Error\Http\PageNotFoundException('The requested resource was not found', 1313857897);
             $configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
             if (isset($configuration['mvc']['throwPageNotFoundExceptionIfActionCantBeResolved']) && (bool)$configuration['mvc']['throwPageNotFoundExceptionIfActionCantBeResolved']) {
                 throw new \TYPO3\CMS\Core\Error\Http\PageNotFoundException('The requested resource was not found', 1313857897);
-            } elseif (isset($configuration['mvc']['callDefaultActionIfActionCantBeResolved']) && (bool)$configuration['mvc']['callDefaultActionIfActionCantBeResolved']) {
+            }
+            if (isset($configuration['mvc']['callDefaultActionIfActionCantBeResolved']) && (bool)$configuration['mvc']['callDefaultActionIfActionCantBeResolved']) {
                 return $this->defaultControllerName;
             }
             throw new \TYPO3\CMS\Extbase\Mvc\Exception\InvalidControllerNameException(
                 return $this->defaultControllerName;
             }
             throw new \TYPO3\CMS\Extbase\Mvc\Exception\InvalidControllerNameException(
@@ -246,7 +247,8 @@ class RequestBuilder implements \TYPO3\CMS\Core\SingletonInterface
             $configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
             if (isset($configuration['mvc']['throwPageNotFoundExceptionIfActionCantBeResolved']) && (bool)$configuration['mvc']['throwPageNotFoundExceptionIfActionCantBeResolved']) {
                 throw new \TYPO3\CMS\Core\Error\Http\PageNotFoundException('The requested resource was not found', 1313857898);
             $configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
             if (isset($configuration['mvc']['throwPageNotFoundExceptionIfActionCantBeResolved']) && (bool)$configuration['mvc']['throwPageNotFoundExceptionIfActionCantBeResolved']) {
                 throw new \TYPO3\CMS\Core\Error\Http\PageNotFoundException('The requested resource was not found', 1313857898);
-            } elseif (isset($configuration['mvc']['callDefaultActionIfActionCantBeResolved']) && (bool)$configuration['mvc']['callDefaultActionIfActionCantBeResolved']) {
+            }
+            if (isset($configuration['mvc']['callDefaultActionIfActionCantBeResolved']) && (bool)$configuration['mvc']['callDefaultActionIfActionCantBeResolved']) {
                 return $defaultActionName;
             }
             throw new \TYPO3\CMS\Extbase\Mvc\Exception\InvalidActionNameException('The action "' . $actionName . '" (controller "' . $controllerName . '") is not allowed by this plugin. Please check TYPO3\\CMS\\Extbase\\Utility\\ExtensionUtility::configurePlugin() in your ext_localconf.php.', 1313855175);
                 return $defaultActionName;
             }
             throw new \TYPO3\CMS\Extbase\Mvc\Exception\InvalidActionNameException('The action "' . $actionName . '" (controller "' . $controllerName . '") is not allowed by this plugin. Please check TYPO3\\CMS\\Extbase\\Utility\\ExtensionUtility::configurePlugin() in your ext_localconf.php.', 1313855175);