[TASK] Use null coalescing operator where possible 10/54810/8
authorWouter Wolters <typo3@wouterwolters.nl>
Thu, 30 Nov 2017 21:16:13 +0000 (22:16 +0100)
committerBenni Mack <benni@typo3.org>
Wed, 27 Dec 2017 14:11:13 +0000 (15:11 +0100)
Using null coalescing operator in PHP 7 simplifies code structure.

Resolves: #83129
Releases: master
Change-Id: I449415c99ccb0ea158d3943800bc824514f7629c
Reviewed-on: https://review.typo3.org/54810
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
147 files changed:
typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php
typo3/sysext/backend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php
typo3/sysext/backend/Classes/ContextMenu/ItemProviders/RecordProvider.php
typo3/sysext/backend/Classes/Controller/AjaxLoginController.php
typo3/sysext/backend/Classes/Controller/ContextHelpAjaxController.php
typo3/sysext/backend/Classes/Controller/ContextMenuController.php
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/File/FileController.php
typo3/sysext/backend/Classes/Controller/FormInlineAjaxController.php
typo3/sysext/backend/Classes/Controller/LogoutController.php
typo3/sysext/backend/Classes/Controller/NewRecordController.php
typo3/sysext/backend/Classes/Controller/SimpleDataHandlerController.php
typo3/sysext/backend/Classes/Controller/UserSettingsController.php
typo3/sysext/backend/Classes/Controller/Wizard/SuggestWizardController.php
typo3/sysext/backend/Classes/Form/Container/FlexFormElementContainer.php
typo3/sysext/backend/Classes/Form/Element/AbstractFormElement.php
typo3/sysext/backend/Classes/Form/Element/UserElement.php
typo3/sysext/backend/Classes/Form/FormDataProvider/AbstractItemProvider.php
typo3/sysext/backend/Classes/Form/FormDataProvider/TcaRecordTitle.php
typo3/sysext/backend/Classes/Form/NodeFactory.php
typo3/sysext/backend/Classes/Form/Wizard/SuggestWizardDefaultReceiver.php
typo3/sysext/backend/Classes/FrontendBackendUserAuthentication.php
typo3/sysext/backend/Classes/Http/AjaxRequestHandler.php
typo3/sysext/backend/Classes/Http/RouteDispatcher.php
typo3/sysext/backend/Classes/Module/ModuleLoader.php
typo3/sysext/backend/Classes/Routing/Route.php
typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/backend/Tests/Unit/Form/FormDataProvider/TcaSelectItemsTest.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/PdoBackend.php
typo3/sysext/core/Classes/Cache/Backend/RedisBackend.php
typo3/sysext/core/Classes/Cache/Backend/TransientMemoryBackend.php
typo3/sysext/core/Classes/Cache/Backend/WincacheBackend.php
typo3/sysext/core/Classes/Configuration/Richtext.php
typo3/sysext/core/Classes/Controller/FileDumpController.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Database/Query/BulkInsertQuery.php
typo3/sysext/core/Classes/Database/Query/Restriction/BackendWorkspaceRestriction.php
typo3/sysext/core/Classes/Database/Query/Restriction/FrontendGroupRestriction.php
typo3/sysext/core/Classes/Database/Query/Restriction/FrontendWorkspaceRestriction.php
typo3/sysext/core/Classes/Html/HtmlParser.php
typo3/sysext/core/Classes/Http/ServerRequest.php
typo3/sysext/core/Classes/Http/ServerRequestFactory.php
typo3/sysext/core/Classes/Imaging/IconFactory.php
typo3/sysext/core/Classes/Log/Processor/IntrospectionProcessor.php
typo3/sysext/core/Classes/Mail/Rfc822AddressesParser.php
typo3/sysext/core/Classes/Migrations/TcaMigration.php
typo3/sysext/core/Classes/Registry.php
typo3/sysext/core/Classes/Resource/File.php
typo3/sysext/core/Classes/Resource/Processing/FileDeletionAspect.php
typo3/sysext/core/Classes/Resource/Processing/TaskTypeRegistry.php
typo3/sysext/core/Classes/TypoScript/ConfigurationForm.php
typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
typo3/sysext/core/Classes/TypoScript/TypoScriptService.php
typo3/sysext/core/Classes/Utility/DebugUtility.php
typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Classes/Utility/HttpUtility.php
typo3/sysext/core/Classes/Utility/RootlineUtility.php
typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Classes/Controller/QueueController.php
typo3/sysext/documentation/Classes/Service/JavaScriptService.php
typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php
typo3/sysext/extbase/Classes/Core/Bootstrap.php
typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php
typo3/sysext/extbase/Classes/Mvc/Cli/RequestBuilder.php
typo3/sysext/extbase/Classes/Mvc/Cli/RequestHandler.php
typo3/sysext/extbase/Classes/Mvc/Controller/CommandController.php
typo3/sysext/extbase/Classes/Mvc/Controller/MvcPropertyMappingConfigurationService.php
typo3/sysext/extbase/Classes/Mvc/Request.php
typo3/sysext/extbase/Classes/Mvc/View/JsonView.php
typo3/sysext/extbase/Classes/Mvc/View/NotFoundView.php
typo3/sysext/extbase/Classes/Mvc/Web/Response.php
typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php
typo3/sysext/extbase/Classes/Persistence/Generic/QueryResult.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php
typo3/sysext/extbase/Classes/Persistence/Repository.php
typo3/sysext/extbase/Classes/Scheduler/FieldProvider.php
typo3/sysext/extbase/Classes/Service/FlexFormService.php
typo3/sysext/extbase/Classes/SignalSlot/Dispatcher.php
typo3/sysext/extbase/Classes/Utility/ExtensionUtility.php
typo3/sysext/extbase/Classes/Utility/FrontendSimulatorUtility.php
typo3/sysext/extbase/Classes/Validation/Validator/GenericObjectValidator.php
typo3/sysext/extbase/Tests/Unit/Reflection/Fixture/ArrayAccessClass.php
typo3/sysext/feedit/Classes/FrontendEditPanel.php
typo3/sysext/fluid/Classes/Core/Widget/Bootstrap.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetRequestBuilder.php
typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Debug/RenderViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Form/Select/OptionViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Format/HtmlViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php
typo3/sysext/form/Classes/Controller/FormEditorController.php
typo3/sysext/form/Classes/Controller/FormFrontendController.php
typo3/sysext/form/Classes/Domain/Factory/ArrayFormFactory.php
typo3/sysext/form/Classes/Domain/Model/FormDefinition.php
typo3/sysext/form/Classes/Domain/Model/Renderable/AbstractRenderable.php
typo3/sysext/form/Classes/Hooks/DataStructureIdentifierHook.php
typo3/sysext/form/Classes/Mvc/Persistence/FormPersistenceManager.php
typo3/sysext/form/Classes/Mvc/Property/PropertyMappingConfiguration.php
typo3/sysext/form/Classes/ViewHelpers/RenderAllFormValuesViewHelper.php
typo3/sysext/form/Classes/ViewHelpers/RenderViewHelper.php
typo3/sysext/frontend/Classes/ContentObject/ContentDataProcessor.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/Exception/ProductionExceptionHandler.php
typo3/sysext/frontend/Classes/ContentObject/FilesContentObject.php
typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
typo3/sysext/frontend/Classes/Controller/ShowImageController.php
typo3/sysext/frontend/Classes/DataProcessing/FilesProcessor.php
typo3/sysext/frontend/Classes/Http/EidRequestHandler.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/frontend/Classes/Service/TypoLinkCodecService.php
typo3/sysext/frontend/Classes/View/AdminPanelView.php
typo3/sysext/impexp/Classes/Import.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/indexed_search/Classes/Controller/SearchController.php
typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
typo3/sysext/indexed_search/Classes/Indexer.php
typo3/sysext/install/Classes/Service/LocalConfigurationValueService.php
typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php
typo3/sysext/opendocs/Classes/Backend/ToolbarItems/OpendocsToolbarItem.php
typo3/sysext/recordlist/Classes/Browser/DatabaseBrowser.php
typo3/sysext/recordlist/Classes/Browser/FileBrowser.php
typo3/sysext/recordlist/Classes/Browser/FolderBrowser.php
typo3/sysext/recordlist/Classes/Controller/AbstractLinkBrowserController.php
typo3/sysext/recordlist/Classes/LinkHandler/FileLinkHandler.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/rsaauth/Classes/Storage/SessionStorage.php
typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php
typo3/sysext/saltedpasswords/Classes/Salt/BlowfishSalt.php
typo3/sysext/saltedpasswords/Classes/Salt/Pbkdf2Salt.php
typo3/sysext/saltedpasswords/Classes/Salt/PhpassSalt.php
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/t3editor/Classes/CodeCompletion.php
typo3/sysext/taskcenter/Classes/TaskStatus.php
typo3/sysext/viewpage/Classes/Controller/ViewModuleController.php
typo3/sysext/workspaces/Classes/Controller/AjaxController.php
typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php
typo3/sysext/workspaces/Classes/Service/GridDataService.php

index ff8d5b2..15bce3f 100644 (file)
@@ -489,7 +489,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface
         $parsedBody = $request->getParsedBody();
         $queryParams = $request->getQueryParams();
 
-        $shortcutId = (int)(isset($parsedBody['shortcutId']) ? $parsedBody['shortcutId'] : $queryParams['shortcutId']);
+        $shortcutId = (int)($parsedBody['shortcutId'] ?? $queryParams['shortcutId']);
         $fullShortcut = $this->getShortcutById($shortcutId);
         $success = false;
         if ($fullShortcut['raw']['userid'] == $this->getBackendUser()->user['uid']) {
@@ -526,7 +526,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface
         // Default name
         $shortcutName = 'Shortcut';
         $shortcutNamePrepend = '';
-        $url = isset($parsedBody['url']) ? $parsedBody['url'] : $queryParams['url'];
+        $url = $parsedBody['url'] ?? $queryParams['url'];
 
         // Use given display name
         if (!empty($parsedBody['displayName'])) {
@@ -699,9 +699,9 @@ class ShortcutToolbarItem implements ToolbarItemInterface
         $queryParams = $request->getQueryParams();
 
         $backendUser = $this->getBackendUser();
-        $shortcutId = (int)(isset($parsedBody['shortcutId']) ? $parsedBody['shortcutId'] : $queryParams['shortcutId']);
-        $shortcutName = strip_tags(isset($parsedBody['shortcutTitle']) ? $parsedBody['shortcutTitle'] : $queryParams['shortcutTitle']);
-        $shortcutGroupId = (int)(isset($parsedBody['shortcutGroup']) ? $parsedBody['shortcutGroup'] : $queryParams['shortcutGroup']);
+        $shortcutId = (int)($parsedBody['shortcutId'] ?? $queryParams['shortcutId']);
+        $shortcutName = strip_tags($parsedBody['shortcutTitle'] ?? $queryParams['shortcutTitle']);
+        $shortcutGroupId = (int)($parsedBody['shortcutGroup'] ?? $queryParams['shortcutGroup']);
 
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
             ->getQueryBuilderForTable('sys_be_shortcuts');
@@ -745,7 +745,7 @@ class ShortcutToolbarItem implements ToolbarItemInterface
      */
     protected function getShortcutGroupLabel($groupId)
     {
-        return isset($this->shortcutGroups[$groupId]) ? $this->shortcutGroups[$groupId] : '';
+        return $this->shortcutGroups[$groupId] ?? '';
     }
 
     /**
index a3b93f4..fb90075 100644 (file)
@@ -171,7 +171,7 @@ class ConditionMatcher extends AbstractConditionMatcher
      */
     protected function getPage()
     {
-        $pageId = isset($this->pageId) ? $this->pageId : $this->determinePageId();
+        $pageId = $this->pageId ?? $this->determinePageId();
         return BackendUtility::getRecord('pages', $pageId);
     }
 
@@ -244,7 +244,7 @@ class ConditionMatcher extends AbstractConditionMatcher
      */
     protected function determineRootline()
     {
-        $pageId = isset($this->pageId) ? $this->pageId : $this->determinePageId();
+        $pageId = $this->pageId ?? $this->determinePageId();
         return BackendUtility::BEgetRootLine($pageId, '', true);
     }
 
index f349451..94b4416 100644 (file)
@@ -294,9 +294,7 @@ class RecordProvider extends AbstractProvider
         }
         if ($itemName === 'newWizard' && $this->table === 'tt_content') {
             $tsConfig = BackendUtility::getModTSconfig($this->record['pid'], 'mod');
-            $moduleName = isset($tsConfig['properties']['newContentElementWizard.']['override'])
-                ? $tsConfig['properties']['newContentElementWizard.']['override']
-                : 'new_content_element_wizard';
+            $moduleName = $tsConfig['properties']['newContentElementWizard.']['override'] ?? 'new_content_element_wizard';
             $urlParameters = [
                 'id' => $this->record['pid'],
                 'sys_language_uid' => $this->record['sys_language_uid'],
@@ -495,7 +493,7 @@ class RecordProvider extends AbstractProvider
     protected function canBeDeleted(): bool
     {
         $disableDeleteTS = $this->backendUser->getTSConfig('options.disableDelete');
-        $disableDelete = (bool) trim(isset($disableDeleteTS['properties'][$this->table]) ? $disableDeleteTS['properties'][$this->table] : (string)$disableDeleteTS['value']);
+        $disableDelete = (bool) trim($disableDeleteTS['properties'][$this->table] ?? (string)$disableDeleteTS['value']);
         return !$disableDelete && $this->canBeEdited();
     }
 
index 2866fe7..9d3627c 100644 (file)
@@ -139,6 +139,6 @@ class AjaxLoginController
      */
     protected function getBackendUser()
     {
-        return isset($GLOBALS['BE_USER']) ? $GLOBALS['BE_USER'] : null;
+        return $GLOBALS['BE_USER'] ?? null;
     }
 }
index 91c56a0..7076f12 100644 (file)
@@ -36,7 +36,7 @@ class ContextHelpAjaxController
      */
     public function getHelpAction(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface
     {
-        $params = isset($request->getParsedBody()['params']) ? $request->getParsedBody()['params'] : $request->getQueryParams()['params'];
+        $params = $request->getParsedBody()['params'] ?? $request->getQueryParams()['params'];
         if ($params['action'] === 'getContextHelp') {
             $result = $this->getContextHelp($params['table'], $params['field']);
             return GeneralUtility::makeInstance(JsonResponse::class, [
index 71bf5ff..c5c159c 100644 (file)
@@ -47,7 +47,7 @@ class ContextMenuController
         $contextMenu = GeneralUtility::makeInstance(ContextMenu::class);
 
         $params = $request->getQueryParams();
-        $context = isset($params['context']) ? $params['context'] : '';
+        $context = $params['context'] ?? '';
         $items = $contextMenu->getItems($params['table'], $params['uid'], $context);
         if (!is_array($items)) {
             $items = [];
index aa253cf..5ee378e 100644 (file)
@@ -783,9 +783,7 @@ class EditDocumentController
         }
 
         $pageTsConfig = BackendUtility::getPagesTSconfig($currentPageId);
-        $previewConfiguration = isset($pageTsConfig['TCEMAIN.']['preview.'][$table . '.'])
-            ? $pageTsConfig['TCEMAIN.']['preview.'][$table . '.']
-            : [];
+        $previewConfiguration = $pageTsConfig['TCEMAIN.']['preview.'][$table . '.'] ?? [];
 
         $recordArray = BackendUtility::getRecord($table, $recordId);
 
@@ -823,13 +821,9 @@ class EditDocumentController
         ];
 
         // language handling
-        $languageField = isset($GLOBALS['TCA'][$table]['ctrl']['languageField'])
-            ? $GLOBALS['TCA'][$table]['ctrl']['languageField']
-            : '';
+        $languageField = $GLOBALS['TCA'][$table]['ctrl']['languageField'] ?? '';
         if ($languageField && !empty($recordArray[$languageField])) {
-            $l18nPointer = isset($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'])
-                ? $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']
-                : '';
+            $l18nPointer = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] ?? '';
             if ($l18nPointer && !empty($recordArray[$l18nPointer])
                 && isset($previewConfiguration['useDefaultLanguageRecord'])
                 && !$previewConfiguration['useDefaultLanguageRecord']
@@ -1873,7 +1867,7 @@ class EditDocumentController
     public function getNewIconMode($table, $key = 'saveDocNew')
     {
         $TSconfig = $this->getBackendUser()->getTSConfig('options.' . $key);
-        $output = trim(isset($TSconfig['properties'][$table]) ? $TSconfig['properties'][$table] : $TSconfig['value']);
+        $output = trim($TSconfig['properties'][$table] ?? $TSconfig['value']);
         return $output;
     }
 
index 307bade..ebbc728 100644 (file)
@@ -246,8 +246,8 @@ class FileController
      */
     public function fileExistsInFolderAction(ServerRequestInterface $request)
     {
-        $fileName = isset($request->getParsedBody()['fileName']) ? $request->getParsedBody()['fileName'] : $request->getQueryParams()['fileName'];
-        $fileTarget = isset($request->getParsedBody()['fileTarget']) ? $request->getParsedBody()['fileTarget'] : $request->getQueryParams()['fileTarget'];
+        $fileName = $request->getParsedBody()['fileName'] ?? $request->getQueryParams()['fileName'];
+        $fileTarget = $request->getParsedBody()['fileTarget'] ?? $request->getQueryParams()['fileTarget'];
 
         /** @var \TYPO3\CMS\Core\Resource\ResourceFactory $fileFactory */
         $fileFactory = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\ResourceFactory::class);
index ef8054b..75e3d1d 100644 (file)
@@ -43,7 +43,7 @@ class FormInlineAjaxController extends AbstractFormEngineAjaxController
      */
     public function createAction(ServerRequestInterface $request): ResponseInterface
     {
-        $ajaxArguments = isset($request->getParsedBody()['ajax']) ? $request->getParsedBody()['ajax'] : $request->getQueryParams()['ajax'];
+        $ajaxArguments = $request->getParsedBody()['ajax'] ?? $request->getQueryParams()['ajax'];
         $parentConfig = $this->extractSignedParentConfigFromRequest((string)$ajaxArguments['context']);
 
         $domObjectId = $ajaxArguments[0];
@@ -173,7 +173,7 @@ class FormInlineAjaxController extends AbstractFormEngineAjaxController
      */
     public function detailsAction(ServerRequestInterface $request): ResponseInterface
     {
-        $ajaxArguments = isset($request->getParsedBody()['ajax']) ? $request->getParsedBody()['ajax'] : $request->getQueryParams()['ajax'];
+        $ajaxArguments = $request->getParsedBody()['ajax'] ?? $request->getQueryParams()['ajax'];
 
         $domObjectId = $ajaxArguments[0];
         $inlineFirstPid = $this->getInlineFirstPidFromDomObjectId($domObjectId);
@@ -255,7 +255,7 @@ class FormInlineAjaxController extends AbstractFormEngineAjaxController
      */
     public function synchronizeLocalizeAction(ServerRequestInterface $request): ResponseInterface
     {
-        $ajaxArguments = isset($request->getParsedBody()['ajax']) ? $request->getParsedBody()['ajax'] : $request->getQueryParams()['ajax'];
+        $ajaxArguments = $request->getParsedBody()['ajax'] ?? $request->getQueryParams()['ajax'];
         $domObjectId = $ajaxArguments[0];
         $type = $ajaxArguments[1];
         $parentConfig = $this->extractSignedParentConfigFromRequest((string)$ajaxArguments['context']);
@@ -412,7 +412,7 @@ class FormInlineAjaxController extends AbstractFormEngineAjaxController
      */
     public function expandOrCollapseAction(ServerRequestInterface $request): ResponseInterface
     {
-        $ajaxArguments = isset($request->getParsedBody()['ajax']) ? $request->getParsedBody()['ajax'] : $request->getQueryParams()['ajax'];
+        $ajaxArguments = $request->getParsedBody()['ajax'] ?? $request->getQueryParams()['ajax'];
         $domObjectId = $ajaxArguments[0];
 
         /** @var InlineStackProcessor $inlineStackProcessor */
index 7df8aa3..0979dfc 100644 (file)
@@ -38,7 +38,7 @@ class LogoutController
     {
         $this->logout();
 
-        $redirectUrl = isset($request->getParsedBody()['redirect']) ? $request->getParsedBody()['redirect'] : $request->getQueryParams()['redirect'];
+        $redirectUrl = $request->getParsedBody()['redirect'] ?? $request->getQueryParams()['redirect'];
         $redirectUrl = GeneralUtility::sanitizeLocalUrl($redirectUrl);
         if (empty($redirectUrl)) {
             /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
index fa517c5..62a765c 100644 (file)
@@ -544,9 +544,7 @@ class NewRecordController
                                 . '<ul>';
                             // If mod.newContentElementWizard.override is set, use that extension's wizard instead:
                             $tsConfig = BackendUtility::getModTSconfig($this->id, 'mod');
-                            $moduleName = isset($tsConfig['properties']['newContentElementWizard.']['override'])
-                                ? $tsConfig['properties']['newContentElementWizard.']['override']
-                                : 'new_content_element_wizard';
+                            $moduleName = $tsConfig['properties']['newContentElementWizard.']['override'] ?? 'new_content_element_wizard';
                             $url = (string)$uriBuilder->buildUriFromRoute($moduleName, ['id' => $this->id, 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')]);
                             $rowContent .= '<li>' . $newLink . ' ' . BackendUtility::wrapInHelp($table, '') . '</li>'
                                 . '<li>'
index f9eafcf..c2d0e56 100644 (file)
@@ -152,7 +152,7 @@ class SimpleDataHandlerController
                 $this->cmd = $clipObj->makePasteCmdArray(
                     $this->CB['paste'],
                     $this->cmd,
-                    isset($this->CB['update']) ? $this->CB['update'] : null
+                    $this->CB['update'] ?? null
                 );
             }
             if ($this->CB['delete']) {
index cf7cbad..ad104fb 100644 (file)
@@ -36,9 +36,9 @@ class UserSettingsController
     public function processAjaxRequest(ServerRequestInterface $request): ResponseInterface
     {
         // do the regular / main logic, depending on the action parameter
-        $action = isset($request->getParsedBody()['action']) ? $request->getParsedBody()['action'] : $request->getQueryParams()['action'];
-        $key = isset($request->getParsedBody()['key']) ? $request->getParsedBody()['key'] : $request->getQueryParams()['key'];
-        $value = isset($request->getParsedBody()['value']) ? $request->getParsedBody()['value'] : $request->getQueryParams()['value'];
+        $action = $request->getParsedBody()['action'] ?? $request->getQueryParams()['action'];
+        $key = $request->getParsedBody()['key'] ?? $request->getQueryParams()['key'];
+        $value = $request->getParsedBody()['value'] ?? $request->getQueryParams()['value'];
 
         $content = $this->process($action, $key, $value);
         return GeneralUtility::makeInstance(JsonResponse::class)->setPayload($content);
index 4510555..adaae69 100644 (file)
@@ -157,7 +157,7 @@ class SuggestWizardController
         }
 
         // Limit the number of items in the result list
-        $maxItems = isset($config['maxItemsInResultList']) ? $config['maxItemsInResultList'] : 10;
+        $maxItems = $config['maxItemsInResultList'] ?? 10;
         $maxItems = min(count($resultRows), $maxItems);
 
         array_splice($resultRows, $maxItems);
index c73729a..87f7b1f 100644 (file)
@@ -64,7 +64,7 @@ class FlexFormElementContainer extends AbstractContainer
 
                 $options = $this->data;
                 $options['flexFormDataStructureArray'] = $flexFormFieldArray;
-                $options['flexFormRowData'] = isset($flexFormRowData[$flexFormFieldName]['el']) ? $flexFormRowData[$flexFormFieldName]['el'] : [];
+                $options['flexFormRowData'] = $flexFormRowData[$flexFormFieldName]['el'] ?? [];
                 $options['flexFormFieldName'] = $flexFormFieldName;
                 $options['renderType'] = 'flexFormSectionContainer';
                 $sectionContainerResult = $this->nodeFactory->create($options)->render();
index 14cca66..98b1def 100644 (file)
@@ -243,7 +243,7 @@ abstract class AbstractFormElement extends AbstractNode
             case 'int':
                 $baseArr = ['dec' => 'd', 'hex' => 'x', 'HEX' => 'X', 'oct' => 'o', 'bin' => 'b'];
                 $base = isset($formatOptions['base']) ? trim($formatOptions['base']) : '';
-                $format = isset($baseArr[$base]) ? $baseArr[$base] : 'd';
+                $format = $baseArr[$base] ?? 'd';
                 $itemValue = sprintf('%' . $format, $itemValue);
                 break;
             case 'float':
index 7b0e439..09a73f7 100644 (file)
@@ -34,9 +34,7 @@ class UserElement extends AbstractFormElement
         $parameterArray['table'] = $this->data['tableName'];
         $parameterArray['field'] = $this->data['fieldName'];
         $parameterArray['row'] = $this->data['databaseRow'];
-        $parameterArray['parameters'] = isset($parameterArray['fieldConf']['config']['parameters'])
-            ? $parameterArray['fieldConf']['config']['parameters']
-            : [];
+        $parameterArray['parameters'] = $parameterArray['fieldConf']['config']['parameters'] ?? [];
         $html = GeneralUtility::callUserFunction(
             $parameterArray['fieldConf']['config']['userFunc'],
             $parameterArray,
index a9d2fa9..57b0f0f 100644 (file)
@@ -1067,7 +1067,7 @@ abstract class AbstractItemProvider
                         $whereClauseSubParts = explode('###', $value, 2);
                         // @todo: Throw exception if there is no value? What happens for NEW records?
                         $databaseRowKey = empty($result['flexParentDatabaseRow']) ? 'databaseRow' : 'flexParentDatabaseRow';
-                        $rowFieldValue = isset($result[$databaseRowKey][$whereClauseSubParts[0]]) ? $result[$databaseRowKey][$whereClauseSubParts[0]] : '';
+                        $rowFieldValue = $result[$databaseRowKey][$whereClauseSubParts[0]] ?? '';
                         if (is_array($rowFieldValue)) {
                             // If a select or group field is used here, it may have been processed already and
                             // is now an array. Use first selected value in this case.
index c934a90..4330e91 100644 (file)
@@ -50,9 +50,7 @@ class TcaRecordTitle implements FormDataProviderInterface
                 'row' => $result['databaseRow'],
                 'title' => '',
                 'isOnSymmetricSide' => $result['isOnSymmetricSide'],
-                'options' => isset($result['processedTca']['ctrl']['formattedLabel_userFunc_options'])
-                    ? $result['processedTca']['ctrl']['formattedLabel_userFunc_options']
-                    : [],
+                'options' => $result['processedTca']['ctrl']['formattedLabel_userFunc_options'] ?? [],
                 'parent' => [
                     'uid' => $result['databaseRow']['uid'],
                     'config' => $result['inlineParentConfig']
@@ -76,9 +74,7 @@ class TcaRecordTitle implements FormDataProviderInterface
                 'table' => $result['tableName'],
                 'row' => $result['databaseRow'],
                 'title' => '',
-                'options' => isset($result['processedTca']['ctrl']['label_userFunc_options'])
-                    ? $result['processedTca']['ctrl']['label_userFunc_options']
-                    : [],
+                'options' => $result['processedTca']['ctrl']['label_userFunc_options'] ?? [],
             ];
             $null = null;
             GeneralUtility::callUserFunction($result['processedTca']['ctrl']['label_userFunc'], $parameters, $null);
index d7bca93..14dd0c0 100644 (file)
@@ -144,7 +144,7 @@ class NodeFactory
         }
         $type = $data['renderType'];
 
-        $className = isset($this->nodeTypes[$type]) ? $this->nodeTypes[$type] : $this->nodeTypes['unknown'];
+        $className = $this->nodeTypes[$type] ?? $this->nodeTypes['unknown'];
 
         if (!empty($this->nodeResolver[$type])) {
             // Resolver with highest priority is called first. If it returns with a new class name,
index 77573df..dd6fc14 100644 (file)
@@ -190,7 +190,7 @@ class SuggestWizardDefaultReceiver
                     'path' => $path,
                     'uid' => $uid,
                     'style' => '',
-                    'class' => isset($this->config['cssClass']) ? $this->config['cssClass'] : '',
+                    'class' => $this->config['cssClass'] ?? '',
                     'sprite' => $spriteIcon
                 ];
                 $rows[$this->table . '_' . $uid] = $this->renderRecord($row, $entry);
index a60ace8..33d2b36 100644 (file)
@@ -115,9 +115,7 @@ class FrontendBackendUserAuthentication extends BackendUserAuthentication
                     if ($GLOBALS['TSFE'] instanceof \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController) {
                         // Grab the Page TSConfig property that determines which controller to use.
                         $pageTSConfig = $GLOBALS['TSFE']->getPagesTSconfig();
-                        $controllerKey = isset($pageTSConfig['TSFE.']['frontendEditingController'])
-                            ? $pageTSConfig['TSFE.']['frontendEditingController']
-                            : 'default';
+                        $controllerKey = $pageTSConfig['TSFE.']['frontendEditingController'] ?? 'default';
                     } else {
                         $controllerKey = 'default';
                     }
index 1c2cb29..c138d2c 100644 (file)
@@ -71,7 +71,7 @@ class AjaxRequestHandler implements RequestHandlerInterface
     public function handleRequest(ServerRequestInterface $request)
     {
         // First get the name of the route
-        $routePath = isset($request->getParsedBody()['route']) ? $request->getParsedBody()['route'] : $request->getQueryParams()['route'];
+        $routePath = $request->getParsedBody()['route'] ?? $request->getQueryParams()['route'];
         $request = $request->withAttribute('routePath', $routePath);
 
         $proceedIfNoUserIsLoggedIn = $this->isLoggedInBackendUserRequired($routePath);
@@ -90,7 +90,7 @@ class AjaxRequestHandler implements RequestHandlerInterface
      */
     public function canHandleRequest(ServerRequestInterface $request)
     {
-        $routePath = isset($request->getParsedBody()['route']) ? $request->getParsedBody()['route'] : $request->getQueryParams()['route'];
+        $routePath = $request->getParsedBody()['route'] ?? $request->getQueryParams()['route'];
         return strpos($routePath, '/ajax/') === 0;
     }
 
index 94d7fa7..3ea2301 100644 (file)
@@ -87,7 +87,7 @@ class RouteDispatcher extends Dispatcher implements DispatcherInterface
         if ($route->getOption('access') === 'public') {
             return true;
         }
-        $token = (string)(isset($request->getParsedBody()['token']) ? $request->getParsedBody()['token'] : $request->getQueryParams()['token']);
+        $token = (string)($request->getParsedBody()['token'] ?? $request->getQueryParams()['token']);
         return $this->getFormProtection()->validateToken($token, 'route', $route->getOption('_identifier'));
     }
 
index 529fcf4..8c28ca7 100644 (file)
@@ -392,9 +392,9 @@ class ModuleLoader
                 $this->addLabelsForModule($moduleName, $labels['default']['ll_ref']);
             } else {
                 $this->moduleLabels[$moduleName] = [
-                    'shortdescription' => isset($labels[$language]['labels']['tablabel']) ? $labels[$language]['labels']['tablabel'] : $labels['default']['labels']['tablabel'],
-                    'description' => isset($labels[$language]['labels']['tabdescr']) ? $labels[$language]['labels']['tabdescr'] : $labels['default']['labels']['tabdescr'],
-                    'title' => isset($labels[$language]['tabs']['tab']) ? $labels[$language]['tabs']['tab'] : $labels['default']['tabs']['tab'],
+                    'shortdescription' => $labels[$language]['labels']['tablabel'] ?? $labels['default']['labels']['tablabel'],
+                    'description' => $labels[$language]['labels']['tabdescr'] ?? $labels['default']['labels']['tabdescr'],
+                    'title' => $labels[$language]['tabs']['tab'] ?? $labels['default']['tabs']['tab'],
                 ];
             }
         }
@@ -408,7 +408,7 @@ class ModuleLoader
      */
     public function getLabelsForModule($moduleName)
     {
-        return isset($this->moduleLabels[$moduleName]) ? $this->moduleLabels[$moduleName] : [];
+        return $this->moduleLabels[$moduleName] ?? [];
     }
 
     /**
index e4b9acb..bf4f0ad 100644 (file)
@@ -115,7 +115,7 @@ class Route
      */
     public function getOption($name)
     {
-        return isset($this->options[$name]) ? $this->options[$name] : null;
+        return $this->options[$name] ?? null;
     }
 
     /**
index a86ad58..9bc3a3f 100644 (file)
@@ -694,10 +694,10 @@ class FolderTreeView extends AbstractTreeView
     protected function generateExpandCollapseParameter($mountKey = null, $doExpand = false, Folder $folderObject = null, $treeName = null)
     {
         $parts = [
-            $mountKey !== null ? $mountKey : $this->bank,
+            $mountKey ?? $this->bank,
             $doExpand == 1 ? 1 : 0,
             $folderObject !== null ? GeneralUtility::md5int($folderObject->getCombinedIdentifier()) : '',
-            $treeName !== null ? $treeName : $this->treeName
+            $treeName ?? $this->treeName
         ];
         return implode('_', $parts);
     }
index e7da3f0..6c6e162 100644 (file)
@@ -1005,7 +1005,7 @@ class PageLayoutView implements LoggerAwareInterface
                         if (is_array($row) && !VersionState::cast($row['t3ver_state'])->equals(VersionState::DELETE_PLACEHOLDER)) {
                             $singleElementHTML = '';
                             if (!$lP && ($this->defLangBinding || $row['sys_language_uid'] != -1)) {
-                                $defaultLanguageElementsByColumn[$columnId][] = (isset($row['_ORIG_uid']) ? $row['_ORIG_uid'] : $row['uid']);
+                                $defaultLanguageElementsByColumn[$columnId][] = ($row['_ORIG_uid'] ?? $row['uid']);
                             }
                             $editUidList .= $row['uid'] . ',';
                             $disableMoveAndNewButtons = $this->defLangBinding && $lP > 0;
@@ -1937,7 +1937,7 @@ class PageLayoutView implements LoggerAwareInterface
                 }
                 // Delete
                 $disableDeleteTS = $this->getBackendUser()->getTSConfig('options.disableDelete');
-                $disableDelete = (bool) trim(isset($disableDeleteTS['properties']['tt_content']) ? $disableDeleteTS['properties']['tt_content'] : $disableDeleteTS['value']);
+                $disableDelete = (bool) trim($disableDeleteTS['properties']['tt_content'] ?? $disableDeleteTS['value']);
                 if (!$disableDelete) {
                     $params = '&cmd[tt_content][' . $row['uid'] . '][delete]=1';
                     $confirm = $this->getLanguageService()->getLL('deleteWarning')
index 7eee75e..c543a2f 100644 (file)
@@ -3474,8 +3474,8 @@ class TcaSelectItemsTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     public function processSelectFieldSetsCorrectValuesForMmRelations(array $input, array $overrideRelationHandlerSettings, array $relationHandlerUids)
     {
         $field = $input['databaseRow']['aField'];
-        $foreignTable = isset($overrideRelationHandlerSettings['foreign_table']) ? $overrideRelationHandlerSettings['foreign_table'] : $input['processedTca']['columns']['aField']['config']['foreign_table'];
-        $mmTable = isset($overrideRelationHandlerSettings['MM']) ? $overrideRelationHandlerSettings['MM'] : $input['processedTca']['columns']['aField']['config']['MM'];
+        $foreignTable = $overrideRelationHandlerSettings['foreign_table'] ?? $input['processedTca']['columns']['aField']['config']['foreign_table'];
+        $mmTable = $overrideRelationHandlerSettings['MM'] ?? $input['processedTca']['columns']['aField']['config']['MM'];
         $uid = $input['databaseRow']['uid'];
         $tableName = $input['tableName'];
         $fieldConfig = $input['processedTca']['columns']['aField']['config'];
index 67a4557..125130d 100644 (file)
@@ -138,7 +138,7 @@ class ApcBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
             throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1232986825);
         }
         $tags[] = '%APCBE%' . $this->cacheIdentifier;
-        $expiration = $lifetime !== null ? $lifetime : $this->defaultLifetime;
+        $expiration = $lifetime ?? $this->defaultLifetime;
         $success = apc_store($this->getIdentifierPrefix() . $entryIdentifier, $data, $expiration);
         if ($success === true) {
             $this->removeIdentifierFromAllTags($entryIdentifier);
index f040447..bdb2620 100644 (file)
@@ -140,7 +140,7 @@ class ApcuBackend extends AbstractBackend implements TaggableBackendInterface
             throw new Cache\Exception\InvalidDataException('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1232986125);
         }
         $tags[] = '%APCBE%' . $this->cacheIdentifier;
-        $expiration = $lifetime !== null ? $lifetime : $this->defaultLifetime;
+        $expiration = $lifetime ?? $this->defaultLifetime;
         $success = apcu_store($this->getIdentifierPrefix() . $entryIdentifier, $data, $expiration);
         if ($success === true) {
             $this->removeIdentifierFromAllTags($entryIdentifier);
index 2817219..044d7b5 100644 (file)
@@ -142,7 +142,7 @@ class FileBackend extends \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend implem
         }
         $this->remove($entryIdentifier);
         $temporaryCacheEntryPathAndFilename = $this->cacheDirectory . StringUtility::getUniqueId() . '.temp';
-        $lifetime = $lifetime === null ? $this->defaultLifetime : $lifetime;
+        $lifetime = $lifetime ?? $this->defaultLifetime;
         $expiryTime = $lifetime === 0 ? 0 : $GLOBALS['EXEC_TIME'] + $lifetime;
         $metaData = str_pad($expiryTime, self::EXPIRYTIME_LENGTH) . implode(' ', $tags) . str_pad(strlen($data), self::DATASIZE_DIGITS);
         $result = file_put_contents($temporaryCacheEntryPathAndFilename, $data . $metaData);
index 317165b..1c656bd 100644 (file)
@@ -234,7 +234,7 @@ class MemcachedBackend extends AbstractBackend implements TaggableBackendInterfa
             throw new Exception('No cache frontend has been set yet via setCache().', 1207149215);
         }
         $tags[] = '%MEMCACHEBE%' . $this->cacheIdentifier;
-        $expiration = $lifetime !== null ? $lifetime : $this->defaultLifetime;
+        $expiration = $lifetime ?? $this->defaultLifetime;
 
         // Memcached consideres values over 2592000 sec (30 days) as UNIX timestamp
         // thus $expiration should be converted from lifetime to UNIX timestamp
index 2f316d4..48e7a4b 100644 (file)
@@ -107,7 +107,7 @@ class PdoBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend implement
             throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1259515601);
         }
         $this->remove($entryIdentifier);
-        $lifetime = $lifetime === null ? $this->defaultLifetime : $lifetime;
+        $lifetime = $lifetime ?? $this->defaultLifetime;
         $statementHandle = $this->databaseHandle->prepare('INSERT INTO "cache" ("identifier", "context", "cache", "created", "lifetime", "content") VALUES (?, ?, ?, ?, ?, ?)');
         $result = $statementHandle->execute([$entryIdentifier, $this->context, $this->cacheIdentifier, $GLOBALS['EXEC_TIME'], $lifetime, $data]);
         if ($result === false) {
index bfe4fd0..06d90ff 100644 (file)
@@ -319,7 +319,7 @@ class RedisBackend extends AbstractBackend implements TaggableBackendInterface
         if (!is_string($data)) {
             throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1279469941);
         }
-        $lifetime = $lifetime === null ? $this->defaultLifetime : $lifetime;
+        $lifetime = $lifetime ?? $this->defaultLifetime;
         if (!is_int($lifetime)) {
             throw new \InvalidArgumentException('The specified lifetime is of type "' . gettype($lifetime) . '" but an integer or NULL is expected.', 1279488008);
         }
index 46fde70..8c48229 100644 (file)
@@ -63,7 +63,7 @@ class TransientMemoryBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBacke
      */
     public function get($entryIdentifier)
     {
-        return isset($this->entries[$entryIdentifier]) ? $this->entries[$entryIdentifier] : false;
+        return $this->entries[$entryIdentifier] ?? false;
     }
 
     /**
index 982d697..11bb207 100644 (file)
@@ -78,7 +78,7 @@ class WincacheBackend extends \TYPO3\CMS\Core\Cache\Backend\AbstractBackend impl
             throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('The specified data is of type "' . gettype($data) . '" but a string is expected.', 1343331522);
         }
         $tags[] = '%WCBE%' . $this->cache->getIdentifier();
-        $expiration = $lifetime !== null ? $lifetime : $this->defaultLifetime;
+        $expiration = $lifetime ?? $this->defaultLifetime;
         $success = wincache_ucache_set($this->identifierPrefix . $entryIdentifier, $data, $expiration);
         if ($success === true) {
             $this->removeIdentifierFromAllTags($entryIdentifier);
index 3d39af9..bc77e6b 100644 (file)
@@ -181,8 +181,8 @@ class Richtext
         // Load PageTSconfig configuration
         $fullPageTsConfig = $this->getRtePageTsConfigOfPid($pid);
         $fullPageTsConfig = !empty($fullPageTsConfig['properties']) ? $fullPageTsConfig['properties'] : [];
-        $defaultPageTsConfigOverrides = isset($fullPageTsConfig['default.']) ? $fullPageTsConfig['default.'] : null;
-        $fieldSpecificPageTsConfigOverrides = isset($fullPageTsConfig['config.'][$table . '.'][$field . '.']) ? $fullPageTsConfig['config.'][$table . '.'][$field . '.'] : null;
+        $defaultPageTsConfigOverrides = $fullPageTsConfig['default.'] ?? null;
+        $fieldSpecificPageTsConfigOverrides = $fullPageTsConfig['config.'][$table . '.'][$field . '.'] ?? null;
         unset($fullPageTsConfig['default.'], $fullPageTsConfig['config.']);
 
         // First use RTE.*
index dcd25e7..5f1cd07 100644 (file)
@@ -98,8 +98,6 @@ class FileDumpController
      */
     protected function getGetOrPost(ServerRequestInterface $request, $parameter)
     {
-        return isset($request->getParsedBody()[$parameter])
-            ? $request->getParsedBody()[$parameter]
-            : (isset($request->getQueryParams()[$parameter]) ? $request->getQueryParams()[$parameter] : null);
+        return $request->getParsedBody()[$parameter] ?? $request->getQueryParams()[$parameter] ?? null;
     }
 }
index 428ba63..52c7561 100644 (file)
@@ -1419,7 +1419,7 @@ class DataHandler implements LoggerAwareInterface
         }
         $evalCodesArray = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$table]['columns'][$labelField]['config']['eval'], true);
         $transformedLabel = $this->checkValue_input_Eval($labelPlaceholder, $evalCodesArray, '');
-        return isset($transformedLabel['value']) ? $transformedLabel['value'] : $labelPlaceholder;
+        return $transformedLabel['value'] ?? $labelPlaceholder;
     }
 
     /**
@@ -1612,7 +1612,7 @@ class DataHandler implements LoggerAwareInterface
             }
             if ($status === 'update') {
                 // This checks 1) if we should check for disallowed tables and 2) if there are records from disallowed tables on the current page
-                $onlyAllowedTables = isset($GLOBALS['PAGES_TYPES'][$value]['onlyAllowedTables']) ? $GLOBALS['PAGES_TYPES'][$value]['onlyAllowedTables'] : $GLOBALS['PAGES_TYPES']['default']['onlyAllowedTables'];
+                $onlyAllowedTables = $GLOBALS['PAGES_TYPES'][$value]['onlyAllowedTables'] ?? $GLOBALS['PAGES_TYPES']['default']['onlyAllowedTables'];
                 if ($onlyAllowedTables) {
                     $theWrongTables = $this->doesPageHaveUnallowedTables($id, $value);
                     if ($theWrongTables) {
@@ -2268,7 +2268,7 @@ class DataHandler implements LoggerAwareInterface
                             // Check file size:
                             if (!$maxSize || $fileSize <= $maxSize * 1024) {
                                 // Prepare filename:
-                                $theEndFileName = isset($this->alternativeFileName[$theFile]) ? $this->alternativeFileName[$theFile] : $theFile;
+                                $theEndFileName = $this->alternativeFileName[$theFile] ?? $theFile;
                                 $fI = GeneralUtility::split_fileref($theEndFileName);
                                 // Check for allowed extension:
                                 if ($this->fileFunc->checkIfAllowed($fI['fileext'], $dest, $theEndFileName)) {
@@ -2369,7 +2369,7 @@ class DataHandler implements LoggerAwareInterface
                                 // Check file size:
                                 if (!$maxSize || $fileSize <= $maxSize * 1024) {
                                     // Prepare filename:
-                                    $theEndFileName = isset($this->alternativeFileName[$theFile]) ? $this->alternativeFileName[$theFile] : $theFile;
+                                    $theEndFileName = $this->alternativeFileName[$theFile] ?? $theFile;
                                     $fI = GeneralUtility::split_fileref($theEndFileName);
                                     // Check for allowed extension:
                                     if ($this->fileFunc->checkIfAllowed($fI['fileext'], $dest, $theEndFileName)) {
@@ -4000,8 +4000,8 @@ class DataHandler implements LoggerAwareInterface
                         $this->versionizeRecord(
                             $v['table'],
                             $v['id'],
-                            (isset($workspaceOptions['label']) ? $workspaceOptions['label'] : 'Auto-created for WS #' . $this->BE_USER->workspace),
-                            (isset($workspaceOptions['delete']) ? $workspaceOptions['delete'] : false)
+                            ($workspaceOptions['label'] ?? 'Auto-created for WS #' . $this->BE_USER->workspace),
+                            ($workspaceOptions['delete'] ?? false)
                         );
                         // Otherwise just use plain copyRecord() to create placeholders etc.
                     } else {
@@ -6591,9 +6591,7 @@ class DataHandler implements LoggerAwareInterface
         } else {
             // Check non-root-level
             $doktype = $this->pageInfo($page_uid, 'doktype');
-            $allowedTableList = isset($GLOBALS['PAGES_TYPES'][$doktype]['allowedTables'])
-                ? $GLOBALS['PAGES_TYPES'][$doktype]['allowedTables']
-                : $GLOBALS['PAGES_TYPES']['default']['allowedTables'];
+            $allowedTableList = $GLOBALS['PAGES_TYPES'][$doktype]['allowedTables'] ?? $GLOBALS['PAGES_TYPES']['default']['allowedTables'];
             $allowedArray = GeneralUtility::trimExplode(',', $allowedTableList, true);
             // If all tables or the table is listed as an allowed type, return TRUE
             if (strpos($allowedTableList, '*') !== false || in_array($checkTable, $allowedArray, true)) {
index e02ba58..f3bf805 100644 (file)
@@ -116,7 +116,7 @@ class BulkInsertQuery
         if (empty($this->columns)) {
             foreach ($values as $index => $value) {
                 $this->parameters[] = $value;
-                $this->types[] = isset($types[$index]) ? $types[$index] : null;
+                $this->types[] = $types[$index] ?? null;
                 $valueSet[] = '?';
             }
 
index 245d35b..c7e99e3 100644 (file)
@@ -40,7 +40,7 @@ class BackendWorkspaceRestriction implements QueryRestrictionInterface
      */
     public function __construct(int $workspaceId = null, $includeRowsForWorkspaceOverlay = true)
     {
-        $this->workspaceId = $workspaceId === null ? $GLOBALS['BE_USER']->workspace : $workspaceId;
+        $this->workspaceId = $workspaceId ?? $GLOBALS['BE_USER']->workspace;
         $this->includeRowsForWorkspaceOverlay = $includeRowsForWorkspaceOverlay;
     }
 
index 44e19c5..d770dfc 100644 (file)
@@ -33,7 +33,7 @@ class FrontendGroupRestriction implements QueryRestrictionInterface
      */
     public function __construct(array $frontendGroupIds = null)
     {
-        $this->frontendGroupIds = $frontendGroupIds === null ? explode(',', $GLOBALS['TSFE']->gr_list) : $frontendGroupIds;
+        $this->frontendGroupIds = $frontendGroupIds ?? explode(',', $GLOBALS['TSFE']->gr_list);
     }
 
     /**
index 2c1c9f6..62cce89 100644 (file)
@@ -46,8 +46,8 @@ class FrontendWorkspaceRestriction implements QueryRestrictionInterface
      */
     public function __construct(int $workspaceId = null, bool $includeRowsForWorkspacePreview = null, bool $enforceLiveRowsOnly = true)
     {
-        $this->workspaceId = $workspaceId === null ? $GLOBALS['TSFE']->sys_page->versioningWorkspaceId : $workspaceId;
-        $this->includeRowsForWorkspacePreview = $includeRowsForWorkspacePreview === null ? $GLOBALS['TSFE']->sys_page->versioningPreview : $includeRowsForWorkspacePreview;
+        $this->workspaceId = $workspaceId ?? $GLOBALS['TSFE']->sys_page->versioningWorkspaceId;
+        $this->includeRowsForWorkspacePreview = $includeRowsForWorkspacePreview ?? $GLOBALS['TSFE']->sys_page->versioningPreview;
         $this->enforceLiveRowsOnly = $enforceLiveRowsOnly;
     }
 
index 5524fb1..cf4912f 100644 (file)
@@ -698,7 +698,7 @@ class HtmlParser
                 // The 'name' of the first tag
                 $firstTagName = $this->getFirstTagName($v);
                 $somethingDone = 0;
-                $prefix = isset($alternatives[strtoupper($firstTagName)]) ? $alternatives[strtoupper($firstTagName)] : $main_prefix;
+                $prefix = $alternatives[strtoupper($firstTagName)] ?? $main_prefix;
                 switch (strtolower($firstTagName)) {
                     case 'td':
 
@@ -759,7 +759,7 @@ class HtmlParser
         }
         $content = implode('', $parts);
         // Fix <style> section:
-        $prefix = isset($alternatives['style']) ? $alternatives['style'] : $main_prefix;
+        $prefix = $alternatives['style'] ?? $main_prefix;
         if ((string)$prefix !== '') {
             $parts = $this->splitIntoBlock('style', $content);
             foreach ($parts as $k => &$part) {
index f6f2916..11eac2c 100644 (file)
@@ -310,7 +310,7 @@ class ServerRequest extends Request implements ServerRequestInterface
      */
     public function getAttribute($name, $default = null)
     {
-        return isset($this->attributes[$name]) ? $this->attributes[$name] : $default;
+        return $this->attributes[$name] ?? $default;
     }
 
     /**
index eb4602b..6bf4823 100644 (file)
@@ -38,7 +38,7 @@ class ServerRequestFactory
         $serverParameters = $_SERVER;
         $headers = static::prepareHeaders($serverParameters);
 
-        $method = isset($serverParameters['REQUEST_METHOD']) ? $serverParameters['REQUEST_METHOD'] : 'GET';
+        $method = $serverParameters['REQUEST_METHOD'] ?? 'GET';
         $uri = new Uri(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'));
 
         $request = new ServerRequest(
index fdd5e17..8a9794d 100644 (file)
@@ -80,7 +80,7 @@ class IconFactory
         $parsedBody = $request->getParsedBody();
         $queryParams = $request->getQueryParams();
         $requestedIcon = json_decode(
-            isset($parsedBody['icon']) ? $parsedBody['icon'] : $queryParams['icon'],
+            $parsedBody['icon'] ?? $queryParams['icon'],
             true
         );
 
index 55ad16b..71864de 100644 (file)
@@ -120,10 +120,10 @@ class IntrospectionProcessor extends AbstractProcessor
             ]);
         } else {
             $logRecord->addData([
-                'file' => isset($trace[0]['file']) ? $trace[0]['file'] : null,
-                'line' => isset($trace[0]['line']) ? $trace[0]['line'] : null,
-                'class' => isset($trace[0]['class']) ? $trace[0]['class'] : null,
-                'function' => isset($trace[0]['function']) ? $trace[0]['function'] : null
+                'file' => $trace[0]['file'] ?? null,
+                'line' => $trace[0]['line'] ?? null,
+                'class' => $trace[0]['class'] ?? null,
+                'function' => $trace[0]['function'] ?? null
             ]);
         }
 
index ae3d9be..9e32038 100644 (file)
@@ -598,7 +598,7 @@ class Rfc822AddressesParser
         $mbox = new \stdClass();
         // Add the phrase (even if empty) and comments
         $mbox->personal = $phrase;
-        $mbox->comment = isset($comments) ? $comments : [];
+        $mbox->comment = $comments ?? [];
         if (isset($route_addr)) {
             $mbox->mailbox = $route_addr['local_part'];
             $mbox->host = $route_addr['domain'];
index dd1df11..c876a84 100644 (file)
@@ -231,10 +231,10 @@ class TcaMigration
                     // Keep empty parameters in trimExplode here (third parameter FALSE), so position is not changed
                     $fieldArray = GeneralUtility::trimExplode(';', $fieldString);
                     $fieldArray = [
-                        'fieldName' => isset($fieldArray[0]) ? $fieldArray[0] : '',
-                        'fieldLabel' => isset($fieldArray[1]) ? $fieldArray[1] : null,
-                        'paletteName' => isset($fieldArray[2]) ? $fieldArray[2] : null,
-                        'fieldExtra' => isset($fieldArray[3]) ? $fieldArray[3] : null,
+                        'fieldName' => $fieldArray[0] ?? '',
+                        'fieldLabel' => $fieldArray[1] ?? null,
+                        'paletteName' => $fieldArray[2] ?? null,
+                        'fieldExtra' => $fieldArray[3] ?? null,
                     ];
                     if (!empty($fieldArray['fieldExtra'])) {
                         // Move fieldExtra "specConf" to columnsOverrides "defaultExtras"
@@ -408,9 +408,9 @@ class TcaMigration
                 foreach ($itemList as $fieldString) {
                     $fieldArray = GeneralUtility::trimExplode(';', $fieldString);
                     $fieldArray = [
-                        'fieldName' => isset($fieldArray[0]) ? $fieldArray[0] : '',
-                        'fieldLabel' => isset($fieldArray[1]) ? $fieldArray[1] : null,
-                        'paletteName' => isset($fieldArray[2]) ? $fieldArray[2] : null,
+                        'fieldName' => $fieldArray[0] ?? '',
+                        'fieldLabel' => $fieldArray[1] ?? null,
+                        'paletteName' => $fieldArray[2] ?? null,
                     ];
                     if ($fieldArray['fieldName'] !== '--palette--' && $fieldArray['paletteName'] !== null) {
                         if ($fieldArray['fieldLabel']) {
index 8add9de..76a1eca 100644 (file)
@@ -55,7 +55,7 @@ class Registry implements SingletonInterface
         if (!$this->isNamespaceLoaded($namespace)) {
             $this->loadEntriesByNamespace($namespace);
         }
-        return isset($this->entries[$namespace][$key]) ? $this->entries[$namespace][$key] : $defaultValue;
+        return $this->entries[$namespace][$key] ?? $defaultValue;
     }
 
     /**
index b03f600..f28529e 100644 (file)
@@ -82,7 +82,7 @@ class File extends AbstractFile
             return parent::getProperty($key);
         }
         $metaData = $this->_getMetaData();
-        return isset($metaData[$key]) ? $metaData[$key] : null;
+        return $metaData[$key] ?? null;
     }
 
     /**
index 596189f..a45ddae 100644 (file)
@@ -126,7 +126,7 @@ class FileDeletionAspect
     {
         // Retrieve the file metadata uid which is different from the file uid.
         $metadataProperties = $fileObject->_getMetaData();
-        $metaDataUid = isset($metadataProperties['_ORIG_uid']) ? $metadataProperties['_ORIG_uid'] : $metadataProperties['uid'];
+        $metaDataUid = $metadataProperties['_ORIG_uid'] ?? $metadataProperties['uid'];
 
         GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('sys_category_record_mm')
             ->delete(
index 56a86e9..162a5c7 100644 (file)
@@ -43,7 +43,7 @@ class TaskTypeRegistry implements \TYPO3\CMS\Core\SingletonInterface
      */
     protected function getClassForTaskType($taskType)
     {
-        return isset($this->registeredTaskTypes[$taskType]) ? $this->registeredTaskTypes[$taskType] : null;
+        return $this->registeredTaskTypes[$taskType] ?? null;
     }
 
     /**
index 23ae475..6340aba 100644 (file)
@@ -160,7 +160,7 @@ class ConfigurationForm extends ExtendedTemplateService
     {
         $fN = 'data[' . $params['name'] . ']';
         $idName = str_replace('.', '-', $params['name']);
-        $fV = ($params['value'] = isset($this->ext_realValues[$params['name']]) ? $this->ext_realValues[$params['name']] : $params['default_value']);
+        $fV = ($params['value'] = $this->ext_realValues[$params['name']] ?? $params['default_value']);
         $reg = [];
         // Values entered from the constantsedit cannot be constants!
         if (preg_match('/^\\{[\\$][a-zA-Z0-9\\.]*\\}$/', trim($fV), $reg)) {
index 92faef1..9ca5a2b 100644 (file)
@@ -1189,7 +1189,7 @@ class ExtendedTemplateService extends TemplateService
                                 foreach ($typeDat['params'] as $val) {
                                     $vParts = explode('=', $val, 2);
                                     $label = $vParts[0];
-                                    $val = isset($vParts[1]) ? $vParts[1] : $vParts[0];
+                                    $val = $vParts[1] ?? $vParts[0];
                                     // option tag:
                                     $sel = '';
                                     if ($val === $params['value']) {
index d866560..1a6ede3 100644 (file)
@@ -35,7 +35,7 @@ class TypoScriptService
         foreach ($typoScriptArray as $key => $value) {
             if (substr((string)$key, -1) === '.') {
                 $keyWithoutDot = substr((string)$key, 0, -1);
-                $typoScriptNodeValue = isset($typoScriptArray[$keyWithoutDot]) ? $typoScriptArray[$keyWithoutDot] : null;
+                $typoScriptNodeValue = $typoScriptArray[$keyWithoutDot] ?? null;
                 if (is_array($value)) {
                     $typoScriptArray[$keyWithoutDot] = $this->convertTypoScriptArrayToPlainArray($value);
                     if ($typoScriptNodeValue !== null) {
@@ -73,7 +73,7 @@ class TypoScriptService
                 }
                 $typoScriptArray[$key . '.'] = $this->convertPlainArrayToTypoScriptArray($value);
             } else {
-                $typoScriptArray[$key] = $value === null ? '' : $value;
+                $typoScriptArray[$key] = $value ?? '';
             }
         }
         return $typoScriptArray;
index 42fbd12..ef0f958 100644 (file)
@@ -219,8 +219,8 @@ class DebugUtility
      */
     protected static function renderDump($variable, $title = '', $plainText = null, $ansiColors = null)
     {
-        $plainText = $plainText === null ? self::isCommandLine() && self::$plainTextOutput : $plainText;
-        $ansiColors = $ansiColors === null ? self::isCommandLine() && self::$ansiColorUsage : $ansiColors;
+        $plainText = $plainText ?? self::isCommandLine() && self::$plainTextOutput;
+        $ansiColors = $ansiColors ?? self::isCommandLine() && self::$ansiColorUsage;
         return trim(DebuggerUtility::var_dump($variable, $title, 8, $plainText, $ansiColors, true));
     }
 
index 9078e88..5dd352b 100644 (file)
@@ -743,7 +743,7 @@ class ExtensionManagementUtility
                 ];
                 $details = [0 => 'field', 1 => 'label', 2 => 'palette'];
                 foreach ($details as $id => $property) {
-                    $items[$key]['details'][$property] = isset($itemDetails[$id]) ? $itemDetails[$id] : '';
+                    $items[$key]['details'][$property] = $itemDetails[$id] ?? '';
                 }
             }
         }
index 49a69a0..45f7f79 100644 (file)
@@ -1822,7 +1822,7 @@ class GeneralUtility
             if ($includeHeader) {
                 $parsedURL = parse_url($url);
                 $method = $includeHeader === 2 ? 'HEAD' : 'GET';
-                $content = $method . ' ' . (isset($parsedURL['path']) ? $parsedURL['path'] : '/')
+                $content = $method . ' ' . ($parsedURL['path'] ?? '/')
                     . ($parsedURL['query'] ? '?' . $parsedURL['query'] : '') . ' HTTP/1.0' . CRLF
                     . 'Host: ' . $parsedURL['host'] . CRLF
                     . 'Connection: close' . CRLF;
@@ -1915,13 +1915,9 @@ class GeneralUtility
         }
         if (static::isAllowedAbsPath($path)) {
             if (@is_file($path)) {
-                $targetPermissions = isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['fileCreateMask'])
-                    ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['fileCreateMask']
-                    : '0644';
+                $targetPermissions = $GLOBALS['TYPO3_CONF_VARS']['SYS']['fileCreateMask'] ?? '0644';
             } elseif (@is_dir($path)) {
-                $targetPermissions = isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['folderCreateMask'])
-                    ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['folderCreateMask']
-                    : '0755';
+                $targetPermissions = $GLOBALS['TYPO3_CONF_VARS']['SYS']['folderCreateMask'] ?? '0755';
             }
             if (!empty($targetPermissions)) {
                 // make sure it's always 4 digits
@@ -2665,7 +2661,7 @@ class GeneralUtility
                 break;
             case 'HTTP_HOST':
                 // if it is not set we're most likely on the cli
-                $retVal = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : null;
+                $retVal = $_SERVER['HTTP_HOST'] ?? null;
                 if (isset($_SERVER['REMOTE_ADDR']) && static::cmpIP($_SERVER['REMOTE_ADDR'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'])) {
                     $host = self::trimExplode(',', $_SERVER['HTTP_X_FORWARDED_HOST']);
                     // Choose which host in list to use
index 4adf855..a7ef021 100644 (file)
@@ -113,9 +113,9 @@ class HttpUtility
         return (isset($urlParts['scheme']) ? $urlParts['scheme'] . '://' : '') .
             (isset($urlParts['user']) ? $urlParts['user'] .
             (isset($urlParts['pass']) ? ':' . $urlParts['pass'] : '') . '@' : '') .
-            (isset($urlParts['host']) ? $urlParts['host'] : '') .
+            ($urlParts['host'] ?? '') .
             (isset($urlParts['port']) ? ':' . $urlParts['port'] : '') .
-            (isset($urlParts['path']) ? $urlParts['path'] : '') .
+            ($urlParts['path'] ?? '') .
             (isset($urlParts['query']) ? '?' . $urlParts['query'] : '') .
             (isset($urlParts['fragment']) ? '#' . $urlParts['fragment'] : '');
     }
index a2e1908..52dc33c 100644 (file)
@@ -292,15 +292,13 @@ class RootlineUtility
                     $loadDBGroup->start(
                         $pageRecord[$column],
                         // @todo That depends on the type (group, select, inline)
-                        isset($configuration['allowed']) ? $configuration['allowed'] : $configuration['foreign_table'],
+                        $configuration['allowed'] ?? $configuration['foreign_table'],
                         $configuration['MM'],
                         $uid,
                         'pages',
                         $configuration
                     );
-                    $relatedUids = isset($loadDBGroup->tableArray[$configuration['foreign_table']])
-                        ? $loadDBGroup->tableArray[$configuration['foreign_table']]
-                        : [];
+                    $relatedUids = $loadDBGroup->tableArray[$configuration['foreign_table']] ?? [];
                 } else {
                     // @todo The assumption is wrong, since group can be used without "MM", but having "allowed"
                     $table = $configuration['foreign_table'];
index a28b2ed..e4ccfeb 100644 (file)
@@ -55,7 +55,7 @@ class QueueController extends AbstractController
         }
         // Clear these states and fetch fresh entities!
         $this->getPersistenceManager()->clearState();
-        $this->forward($call[1], $call[0], null, isset($call[2]) ? $call[2] : null);
+        $this->forward($call[1], $call[0], null, $call[2] ?? null);
     }
 
     public function finishAction()
index 24aee31..51dec98 100644 (file)
@@ -53,6 +53,6 @@ class JavaScriptService
      */
     protected function getBeUser()
     {
-        return isset($GLOBALS['BE_USER']) ? $GLOBALS['BE_USER'] : null;
+        return $GLOBALS['BE_USER'] ?? null;
     }
 }
index ddc70ee..e5122a9 100644 (file)
@@ -125,8 +125,8 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
     {
         // reset 1st level cache
         $this->configurationCache = [];
-        $this->extensionName = isset($configuration['extensionName']) ? $configuration['extensionName'] : null;
-        $this->pluginName = isset($configuration['pluginName']) ? $configuration['pluginName'] : null;
+        $this->extensionName = $configuration['extensionName'] ?? null;
+        $this->pluginName = $configuration['pluginName'] ?? null;
         $this->configuration = $this->typoScriptService->convertTypoScriptArrayToPlainArray($configuration);
     }
 
index 7ca3ef8..e56d73a 100644 (file)
@@ -97,7 +97,7 @@ class Bootstrap implements \TYPO3\CMS\Extbase\Core\BootstrapInterface
     {
         $this->configurationManager = $this->objectManager->get(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
         /** @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject */
-        $contentObject = isset($this->cObj) ? $this->cObj : \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+        $contentObject = $this->cObj ?? \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
         $this->configurationManager->setContentObject($contentObject);
         $this->configurationManager->setConfiguration($configuration);
     }
index fcc8b6b..ecb843d 100644 (file)
@@ -231,7 +231,7 @@ abstract class AbstractDomainObject implements DomainObjectInterface, \TYPO3\CMS
      */
     public function _getCleanProperty($propertyName)
     {
-        return isset($this->_cleanProperties[$propertyName]) ? $this->_cleanProperties[$propertyName] : null;
+        return $this->_cleanProperties[$propertyName] ?? null;
     }
 
     /**
index d02c98c..e56667a 100644 (file)
@@ -232,7 +232,7 @@ class RequestBuilder implements \TYPO3\CMS\Core\SingletonInterface
             $currentArgument .= array_shift($rawCommandLineArguments);
             $splitArgument = explode('=', $currentArgument);
         }
-        $value = isset($splitArgument[1]) ? $splitArgument[1] : '';
+        $value = $splitArgument[1] ?? '';
         return $value;
     }
 }
index c7e84da..46c534e 100644 (file)
@@ -80,7 +80,7 @@ class RequestHandler implements \TYPO3\CMS\Extbase\Mvc\RequestHandlerInterface
      */
     public function handleRequest()
     {
-        $commandLine = isset($_SERVER['argv']) ? $_SERVER['argv'] : [];
+        $commandLine = $_SERVER['argv'] ?? [];
         $callingScript = array_shift($commandLine);
         if ($callingScript !== $_SERVER['_']) {
             $callingScript = $_SERVER['_'] . ' ' . $callingScript;
index 26058af..bdd4e02 100644 (file)
@@ -174,7 +174,7 @@ class CommandController implements CommandControllerInterface
             if ($dataType === null) {
                 throw new InvalidArgumentTypeException(sprintf('The argument type for parameter $%s of method %s->%s() could not be detected.', $parameterName, static::class, $this->commandMethodName), 1306755296);
             }
-            $defaultValue = (isset($parameterInfo['defaultValue']) ? $parameterInfo['defaultValue'] : null);
+            $defaultValue = ($parameterInfo['defaultValue'] ?? null);
             $this->arguments->addNewArgument($parameterName, $dataType, ($parameterInfo['optional'] === false), $defaultValue);
         }
     }
@@ -331,6 +331,6 @@ class CommandController implements CommandControllerInterface
      */
     protected function getBackendUserAuthentication()
     {
-        return isset($GLOBALS['BE_USER']) ? $GLOBALS['BE_USER'] : null;
+        return $GLOBALS['BE_USER'] ?? null;
     }
 }
index 9d2f52c..ea6405c 100644 (file)
@@ -91,7 +91,7 @@ class MvcPropertyMappingConfigurationService implements \TYPO3\CMS\Core\Singleto
             }
         }
         if ($fieldNamePrefix !== '') {
-            $formFieldArray = (isset($formFieldArray[$fieldNamePrefix]) ? $formFieldArray[$fieldNamePrefix] : []);
+            $formFieldArray = ($formFieldArray[$fieldNamePrefix] ?? []);
         }
         return $this->serializeAndHashFormFieldArray($formFieldArray);
     }
index d1e3ded..ac96ad6 100644 (file)
@@ -197,9 +197,9 @@ class Request implements RequestInterface
     public function setControllerObjectName($controllerObjectName)
     {
         $nameParts = ClassNamingUtility::explodeObjectControllerName($controllerObjectName);
-        $this->controllerVendorName = isset($nameParts['vendorName']) ? $nameParts['vendorName'] : null;
+        $this->controllerVendorName = $nameParts['vendorName'] ?? null;
         $this->controllerExtensionName = $nameParts['extensionName'];
-        $this->controllerSubpackageKey = isset($nameParts['subpackageKey']) ? $nameParts['subpackageKey'] : null;
+        $this->controllerSubpackageKey = $nameParts['subpackageKey'] ?? null;
         $this->controllerName = $nameParts['controllerName'];
     }
 
index c132eac..1d8005c 100644 (file)
@@ -243,12 +243,12 @@ class JsonView extends AbstractView
     {
         if (count($this->variablesToRender) === 1) {
             $variableName = current($this->variablesToRender);
-            $valueToRender = isset($this->variables[$variableName]) ? $this->variables[$variableName] : null;
-            $configuration = isset($this->configuration[$variableName]) ? $this->configuration[$variableName] : [];
+            $valueToRender = $this->variables[$variableName] ?? null;
+            $configuration = $this->configuration[$variableName] ?? [];
         } else {
             $valueToRender = [];
             foreach ($this->variablesToRender as $variableName) {
-                $valueToRender[$variableName] = isset($this->variables[$variableName]) ? $this->variables[$variableName] : null;
+                $valueToRender[$variableName] = $this->variables[$variableName] ?? null;
             }
             $configuration = $this->configuration;
         }
@@ -277,7 +277,7 @@ class JsonView extends AbstractView
                     if (isset($configuration['_exclude']) && is_array($configuration['_exclude']) && in_array($key, $configuration['_exclude'])) {
                         continue;
                     }
-                    $array[$key] = $this->transformValue($element, isset($configuration[$key]) ? $configuration[$key] : []);
+                    $array[$key] = $this->transformValue($element, $configuration[$key] ?? []);
                 }
             }
             return $array;
index 64e1b35..a4435e8 100644 (file)
@@ -43,7 +43,7 @@ class NotFoundView extends \TYPO3\CMS\Extbase\Mvc\View\AbstractView
             $template = str_replace('###BASEURI###', \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), $template);
         }
         foreach ($this->variablesMarker as $variableName => $marker) {
-            $variableValue = isset($this->variables[$variableName]) ? $this->variables[$variableName] : '';
+            $variableValue = $this->variables[$variableName] ?? '';
             $template = str_replace('###' . $marker . '###', $variableValue, $template);
         }
         return $template;
index 55775bf..b06abe1 100644 (file)
@@ -143,7 +143,7 @@ class Response extends \TYPO3\CMS\Extbase\Mvc\Response
             throw new \InvalidArgumentException('No message found for HTTP status code "' . $code . '".', 1220526014);
         }
         $this->statusCode = $code;
-        $this->statusMessage = $message === null ? $this->statusMessages[$code] : $message;
+        $this->statusMessage = $message ?? $this->statusMessages[$code];
     }
 
     /**
@@ -199,7 +199,7 @@ class Response extends \TYPO3\CMS\Extbase\Mvc\Response
     {
         $preparedHeaders = [];
         if ($this->statusCode !== null) {
-            $protocolVersion = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';
+            $protocolVersion = $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0';
             $statusHeader = $protocolVersion . ' ' . $this->statusCode . ' ' . $this->statusMessage;
             $preparedHeaders[] = $statusHeader;
         }
index 1696441..aeaa392 100644 (file)
@@ -725,7 +725,7 @@ class UriBuilder
     protected function buildTypolinkConfiguration()
     {
         $typolinkConfiguration = [];
-        $typolinkConfiguration['parameter'] = $this->targetPageUid !== null ? $this->targetPageUid : $GLOBALS['TSFE']->id;
+        $typolinkConfiguration['parameter'] = $this->targetPageUid ?? $GLOBALS['TSFE']->id;
         if ($this->targetPageType !== 0) {
             $typolinkConfiguration['parameter'] .= ',' . $this->targetPageType;
         } elseif ($this->format !== '') {
index 1ab4d35..65c0851 100644 (file)
@@ -306,9 +306,9 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface
      */
     protected function setType(ColumnMap $columnMap, $columnConfiguration)
     {
-        $tableColumnType = (isset($columnConfiguration['type'])) ? $columnConfiguration['type'] : null;
+        $tableColumnType = $columnConfiguration['type'] ?? null;
         $columnMap->setType(\TYPO3\CMS\Core\DataHandling\TableColumnType::cast($tableColumnType));
-        $tableColumnSubType = (isset($columnConfiguration['internal_type'])) ? $columnConfiguration['internal_type'] : null;
+        $tableColumnSubType = $columnConfiguration['internal_type'] ?? null;
         $columnMap->setInternalType(\TYPO3\CMS\Core\DataHandling\TableColumnSubType::cast($tableColumnSubType));
 
         return $columnMap;
index 3d47e91..2953267 100644 (file)
@@ -170,7 +170,7 @@ class QueryResult implements QueryResultInterface
     public function offsetGet($offset)
     {
         $this->initialize();
-        return isset($this->queryResult[$offset]) ? $this->queryResult[$offset] : null;
+        return $this->queryResult[$offset] ?? null;
     }
 
     /**
index 99fcb76..a2e01b7 100644 (file)
@@ -956,7 +956,7 @@ class Typo3DbQueryParser
         $propertyName = $explodedPropertyPath[0];
         $columnName = $this->dataMapper->convertPropertyNameToColumnName($propertyName, $className);
         $realTableName = $this->dataMapper->convertClassNameToTableName($className);
-        $tableName = isset($this->tablePropertyMap[$fullPropertyPath]) ? $this->tablePropertyMap[$fullPropertyPath] : $realTableName;
+        $tableName = $this->tablePropertyMap[$fullPropertyPath] ?? $realTableName;
         $columnMap = $this->dataMapper->getDataMap($className)->getColumnMap($propertyName);
 
         if ($columnMap === null) {
index 60c0027..0123564 100644 (file)
@@ -243,7 +243,7 @@ class Repository implements RepositoryInterface, \TYPO3\CMS\Core\SingletonInterf
                 return $result->getFirst();
             }
             if (is_array($result)) {
-                return isset($result[0]) ? $result[0] : null;
+                return $result[0] ?? null;
             }
         } elseif (substr($methodName, 0, 7) === 'countBy' && strlen($methodName) > 8) {
             $propertyName = lcfirst(substr($methodName, 7));
index b65b8d1..9f83ceb 100644 (file)
@@ -50,9 +50,9 @@ class FieldProvider implements \TYPO3\CMS\Scheduler\AdditionalFieldProviderInter
      */
     public function __construct(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager = null, \TYPO3\CMS\Extbase\Mvc\Cli\CommandManager $commandManager = null, \TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService = null)
     {
-        $this->objectManager = $objectManager !== null ? $objectManager : \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
-        $this->commandManager = $commandManager !== null ? $commandManager : $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Cli\CommandManager::class);
-        $this->reflectionService = $reflectionService !== null ? $reflectionService : $this->objectManager->get(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class);
+        $this->objectManager = $objectManager ?? \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class);
+        $this->commandManager = $commandManager ?? $this->objectManager->get(\TYPO3\CMS\Extbase\Mvc\Cli\CommandManager::class);
+        $this->reflectionService = $reflectionService ?? $this->objectManager->get(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class);
     }
 
     /**
@@ -179,7 +179,7 @@ class FieldProvider implements \TYPO3\CMS\Scheduler\AdditionalFieldProviderInter
             $name = $argument->getName();
             $defaultValue = $this->getDefaultArgumentValue($argument);
             $this->task->addDefaultValue($name, $defaultValue);
-            $value = isset($argumentValues[$name]) ? $argumentValues[$name] : $defaultValue;
+            $value = $argumentValues[$name] ?? $defaultValue;
             $fields[$name] = [
                 'code' => $this->renderField($argument, $value),
                 'label' => $this->getArgumentLabel($argument)
index 6b1471a..ad68280 100644 (file)
@@ -35,7 +35,7 @@ class FlexFormService implements \TYPO3\CMS\Core\SingletonInterface
     {
         $settings = [];
         $flexFormArray = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array($flexFormContent);
-        $flexFormArray = isset($flexFormArray['data']) ? $flexFormArray['data'] : [];
+        $flexFormArray = $flexFormArray['data'] ?? [];
         foreach (array_values($flexFormArray) as $languages) {
             if (!is_array($languages[$languagePointer])) {
                 continue;
index 2a905cd..a5fc636 100644 (file)
@@ -164,6 +164,6 @@ class Dispatcher implements \TYPO3\CMS\Core\SingletonInterface
      */
     public function getSlots($signalClassName, $signalName)
     {
-        return isset($this->slots[$signalClassName][$signalName]) ? $this->slots[$signalClassName][$signalName] : [];
+        return $this->slots[$signalClassName][$signalName] ?? [];
     }
 }
index d1c2e4f..f809605 100644 (file)
@@ -128,9 +128,7 @@ tt_content.' . $pluginSignature . ' {
         $extensionKey = \TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($extensionName);
 
         // pluginType is usually defined by configurePlugin() in the global array. Use this or fall back to default "list_type".
-        $pluginType = isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['plugins'][$pluginName]['pluginType'])
-            ? $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['plugins'][$pluginName]['pluginType']
-            : 'list_type';
+        $pluginType = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['extbase']['extensions'][$extensionName]['plugins'][$pluginName]['pluginType'] ?? 'list_type';
 
         \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
             [$pluginTitle, $pluginSignature, $pluginIcon],
index 7551ed3..672ccc9 100644 (file)
@@ -34,10 +34,10 @@ class FrontendSimulatorUtility
      */
     public static function simulateFrontendEnvironment(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $cObj = null)
     {
-        self::$tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : null;
+        self::$tsfeBackup = $GLOBALS['TSFE'] ?? null;
         $GLOBALS['TSFE'] = new \stdClass();
         $GLOBALS['TSFE']->cObjectDepthCounter = 100;
-        $GLOBALS['TSFE']->cObj = $cObj !== null ? $cObj : \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+        $GLOBALS['TSFE']->cObj = $cObj ?? \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
     }
 
     /**
index a45aaf9..4a2cd08 100644 (file)
@@ -163,7 +163,7 @@ class GenericObjectValidator extends AbstractValidator implements ObjectValidato
     public function getPropertyValidators($propertyName = null)
     {
         if ($propertyName !== null) {
-            return (isset($this->propertyValidators[$propertyName])) ? $this->propertyValidators[$propertyName] : [];
+            return $this->propertyValidators[$propertyName] ?? [];
         }
         return $this->propertyValidators;
     }
index df8e150..473342d 100644 (file)
@@ -74,6 +74,6 @@ class ArrayAccessClass implements \ArrayAccess
      */
     public function getVirtual()
     {
-        return isset($this->array['virtual']) ? $this->array['virtual'] : 'default-value';
+        return $this->array['virtual'] ?? 'default-value';
     }
 }
index fcc311b..ac6028d 100644 (file)
@@ -183,9 +183,7 @@ class FrontendEditPanel
         }
 
         $hidden = $this->isDisabled($table, $dataArr) ? ' typo3-feedit-element-hidden' : '';
-        $outerWrapConfig = isset($conf['stdWrap.'])
-            ? $conf['stdWrap.']
-            : ['wrap' => '<div class="typo3-feedit-element' . $hidden . '">|</div>'];
+        $outerWrapConfig = $conf['stdWrap.'] ?? ['wrap' => '<div class="typo3-feedit-element' . $hidden . '">|</div>'];
         $finalOut = $this->cObj->stdWrap($finalOut, $outerWrapConfig);
 
         return $finalOut;
index 14d8c67..e3e87e7 100644 (file)
@@ -67,7 +67,7 @@ class Bootstrap
     {
         $this->configurationManager = $this->objectManager->get(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
         /** @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject */
-        $contentObject = isset($this->cObj) ? $this->cObj : \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+        $contentObject = $this->cObj ?? \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
         $this->configurationManager->setContentObject($contentObject);
         $this->configurationManager->setConfiguration($configuration);
     }
index 05bb6e2..a858bd0 100644 (file)
@@ -44,7 +44,7 @@ class WidgetRequestBuilder extends \TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder
         $request = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Widget\WidgetRequest::class);
         $request->setRequestUri(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'));
         $request->setBaseUri(GeneralUtility::getIndpEnv('TYPO3_SITE_URL'));
-        $request->setMethod(isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : null);
+        $request->setMethod($_SERVER['REQUEST_METHOD'] ?? null);
         if (strtolower($_SERVER['REQUEST_METHOD']) === 'post') {
             $request->setArguments(GeneralUtility::_POST());
         } else {
index 829e028..1fd1e38 100644 (file)
@@ -155,7 +155,7 @@ class CObjectViewHelper extends AbstractViewHelper
      */
     protected static function simulateFrontendEnvironment()
     {
-        static::$tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : null;
+        static::$tsfeBackup = $GLOBALS['TSFE'] ?? null;
         $GLOBALS['TSFE'] = new \stdClass();
         $GLOBALS['TSFE']->cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
         $GLOBALS['TSFE']->cObjectDepthCounter = 100;
index 1624283..92fcfbd 100644 (file)
@@ -80,7 +80,7 @@ class RenderViewHelper extends AbstractViewHelper
         // not set, NULL is returned and cast to a new, empty string
         // outside of this ViewHelper.
         if ($content === '') {
-            $content = isset($this->arguments['default']) ? $this->arguments['default'] : $tagContent;
+            $content = $this->arguments['default'] ?? $tagContent;
         }
 
         $cssRules = [];
index 0c9c0f6..0b2a6a6 100644 (file)
@@ -115,7 +115,7 @@ class FlashMessagesViewHelper extends AbstractViewHelper
     public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
     {
         $as = $arguments['as'];
-        $queueIdentifier = isset($arguments['queueIdentifier']) ? $arguments['queueIdentifier'] : null;
+        $queueIdentifier = $arguments['queueIdentifier'] ?? null;
         $flashMessages = $renderingContext->getControllerContext()
             ->getFlashMessageQueue($queueIdentifier)->getAllMessagesAndFlush();
         if ($flashMessages === null || count($flashMessages) === 0) {
index a7a389a..4561531 100644 (file)
@@ -55,7 +55,7 @@ class OptionViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFie
         }
         $childContent = $this->renderChildren();
         $this->tag->setContent($childContent);
-        $value = isset($this->arguments['value']) ? $this->arguments['value'] : $childContent;
+        $value = $this->arguments['value'] ?? $childContent;
         $this->tag->addAttribute('value', $value);
         $parentRequestedFormTokenFieldName = $this->viewHelperVariableContainer->get(
             SelectViewHelper::class,
index e2c7a0b..1820cfd 100644 (file)
@@ -113,7 +113,7 @@ class DateViewHelper extends AbstractViewHelper
     public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
     {
         $format = $arguments['format'];
-        $base = $arguments['base'] === null ? time() : $arguments['base'];
+        $base = $arguments['base'] ?? time();
         if (is_string($base)) {
             $base = trim($base);
         }
index 6bc05bc..029dd4f 100644 (file)
@@ -115,7 +115,7 @@ class HtmlViewHelper extends AbstractViewHelper
      */
     protected static function simulateFrontendEnvironment()
     {
-        self::$tsfeBackup = isset($GLOBALS['TSFE']) ? $GLOBALS['TSFE'] : null;
+        self::$tsfeBackup = $GLOBALS['TSFE'] ?? null;
         $GLOBALS['TSFE'] = new \stdClass();
         $GLOBALS['TSFE']->tmpl = new \stdClass();
         $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
index 5a6eb77..dedb94b 100644 (file)
@@ -125,14 +125,14 @@ class TranslateViewHelper extends AbstractViewHelper
         }
 
         $request = $renderingContext->getControllerContext()->getRequest();
-        $extensionName = $extensionName === null ? $request->getControllerExtensionName() : $extensionName;
+        $extensionName = $extensionName ?? $request->getControllerExtensionName();
         try {
             $value = static::translate($id, $extensionName, $translateArguments, $arguments['languageKey'], $arguments['alternativeLanguageKeys']);
         } catch (\InvalidArgumentException $e) {
             $value = null;
         }
         if ($value === null) {
-            $value = $default !== null ? $default : $renderChildrenClosure();
+            $value = $default ?? $renderChildrenClosure();
             if (!empty($translateArguments)) {
                 $value = vsprintf($value, $translateArguments);
             }
index 63cf254..227b874 100644 (file)
@@ -75,7 +75,7 @@ class FormEditorController extends AbstractBackendController
         $formDefinition = $this->formPersistenceManager->load($formPersistenceIdentifier);
         $formDefinition = ArrayUtility::stripTagsFromValuesRecursive($formDefinition);
         if (empty($prototypeName)) {
-            $prototypeName = isset($formDefinition['prototypeName']) ? $formDefinition['prototypeName'] : 'standard';
+            $prototypeName = $formDefinition['prototypeName'] ?? 'standard';
         }
         $formDefinition['prototypeName'] = $prototypeName;
 
@@ -197,7 +197,7 @@ class FormEditorController extends AbstractBackendController
     public function renderFormPageAction(FormDefinitionArray $formDefinition, int $pageIndex, string $prototypeName = null): string
     {
         if (empty($prototypeName)) {
-            $prototypeName = isset($formDefinition['prototypeName']) ? $formDefinition['prototypeName'] : 'standard';
+            $prototypeName = $formDefinition['prototypeName'] ?? 'standard';
         }
 
         $formFactory = $this->objectManager->get(ArrayFormFactory::class);
@@ -217,7 +217,7 @@ class FormEditorController extends AbstractBackendController
      */
     protected function getInsertRenderablesPanelConfiguration(array $formElementsDefinition): array
     {
-        $formElementGroups = isset($this->prototypeConfiguration['formEditor']['formElementGroups']) ? $this->prototypeConfiguration['formEditor']['formElementGroups'] : [];
+        $formElementGroups = $this->prototypeConfiguration['formEditor']['formElementGroups'] ?? [];
         $formElementsByGroup = [];
 
         foreach ($formElementsDefinition as $formElementName => $formElementConfiguration) {
index 2c2e533..c9e304e 100644 (file)
@@ -88,7 +88,7 @@ class FormFrontendController extends ActionController
             foreach ($formDefinition['finishers'] as &$finisherValue) {
                 $finisherIdentifier = $finisherValue['identifier'];
                 if ($this->settings['overrideFinishers'] && isset($this->settings['finishers'][$finisherIdentifier])) {
-                    $prototypeName = isset($formDefinition['prototypeName']) ? $formDefinition['prototypeName'] : 'standard';
+                    $prototypeName = $formDefinition['prototypeName'] ?? 'standard';
                     $configurationService = $this->objectManager->get(ConfigurationService::class);
                     $prototypeConfiguration = $configurationService->getPrototypeConfiguration($prototypeName);
 
index 4e6c6b2..ea42b2a 100644 (file)
@@ -45,9 +45,9 @@ class ArrayFormFactory extends AbstractFormFactory
     public function build(array $configuration, string $prototypeName = null): FormDefinition
     {
         if (empty($prototypeName)) {
-            $prototypeName = isset($configuration['prototypeName']) ? $configuration['prototypeName'] : 'standard';
+            $prototypeName = $configuration['prototypeName'] ?? 'standard';
         }
-        $persistenceIdentifier = (isset($configuration['persistenceIdentifier'])) ? $configuration['persistenceIdentifier'] : null;
+        $persistenceIdentifier = $configuration['persistenceIdentifier'] ?? null;
 
         $prototypeConfiguration = GeneralUtility::makeInstance(ObjectManager::class)
             ->get(ConfigurationService::class)
index 6980070..ba70f50 100644 (file)
@@ -304,9 +304,9 @@ class FormDefinition extends AbstractCompositeRenderable
         string $type = 'Form',
         string $persistenceIdentifier = null
     ) {
-        $this->typeDefinitions = isset($prototypeConfiguration['formElementsDefinition']) ? $prototypeConfiguration['formElementsDefinition'] : [];
-        $this->validatorsDefinition = isset($prototypeConfiguration['validatorsDefinition']) ? $prototypeConfiguration['validatorsDefinition'] : [];
-        $this->finishersDefinition = isset($prototypeConfiguration['finishersDefinition']) ? $prototypeConfiguration['finishersDefinition'] : [];
+        $this->typeDefinitions = $prototypeConfiguration['formElementsDefinition'] ?? [];
+        $this->validatorsDefinition = $prototypeConfiguration['validatorsDefinition'] ?? [];
+        $this->finishersDefinition = $prototypeConfiguration['finishersDefinition'] ?? [];
 
         if (!is_string($identifier) || strlen($identifier) === 0) {
             throw new IdentifierNotValidException('The given identifier was not a string or the string was empty.', 1477082503);
@@ -355,7 +355,7 @@ class FormDefinition extends AbstractCompositeRenderable
         if (isset($options['renderingOptions'])) {
             foreach ($options['renderingOptions'] as $key => $value) {
                 if (is_array($value)) {
-                    $currentValue = isset($this->getRenderingOptions()[$key]) ? $this->getRenderingOptions()[$key] : [];
+                    $currentValue = $this->getRenderingOptions()[$key] ?? [];
                     ArrayUtility::mergeRecursiveWithOverrule($currentValue, $value);
                     $this->setRenderingOption($key, $currentValue);
                 } else {
@@ -365,7 +365,7 @@ class FormDefinition extends AbstractCompositeRenderable
         }
         if (isset($options['finishers'])) {
             foreach ($options['finishers'] as $finisherConfiguration) {
-                $this->createFinisher($finisherConfiguration['identifier'], isset($finisherConfiguration['options']) ? $finisherConfiguration['options'] : []);
+                $this->createFinisher($finisherConfiguration['identifier'], $finisherConfiguration['options'] ?? []);
             }
         }
 
@@ -500,7 +500,7 @@ class FormDefinition extends AbstractCompositeRenderable
     {
         if (isset($this->finishersDefinition[$finisherIdentifier]) && is_array($this->finishersDefinition[$finisherIdentifier]) && isset($this->finishersDefinition[$finisherIdentifier]['implementationClassName'])) {
             $implementationClassName = $this->finishersDefinition[$finisherIdentifier]['implementationClassName'];
-            $defaultOptions = isset($this->finishersDefinition[$finisherIdentifier]['options']) ? $this->finishersDefinition[$finisherIdentifier]['options'] : [];
+            $defaultOptions = $this->finishersDefinition[$finisherIdentifier]['options'] ?? [];
             ArrayUtility::mergeRecursiveWithOverrule($defaultOptions, $options);
 
             $finisher = $this->objectManager->get($implementationClassName, $finisherIdentifier);
@@ -563,7 +563,7 @@ class FormDefinition extends AbstractCompositeRenderable
      */
     public function getElementByIdentifier(string $elementIdentifier)
     {
-        return isset($this->elementsByIdentifier[$elementIdentifier]) ? $this->elementsByIdentifier[$elementIdentifier] : null;
+        return $this->elementsByIdentifier[$elementIdentifier] ?? null;
     }
 
     /**
index 2f1e603..cb7010c 100644 (file)
@@ -147,7 +147,7 @@ abstract class AbstractRenderable implements RenderableInterface
         if (isset($options['renderingOptions'])) {
             foreach ($options['renderingOptions'] as $key => $value) {
                 if (is_array($value)) {
-                    $currentValue = isset($this->getRenderingOptions()[$key]) ? $this->getRenderingOptions()[$key] : [];
+                    $currentValue = $this->getRenderingOptions()[$key] ?? [];
                     ArrayUtility::mergeRecursiveWithOverrule($currentValue, $value);
                     $this->setRenderingOption($key, $currentValue);
                 } else {
@@ -158,7 +158,7 @@ abstract class AbstractRenderable implements RenderableInterface
 
         if (isset($options['validators'])) {
             foreach ($options['validators'] as $validatorConfiguration) {
-                $this->createValidator($validatorConfiguration['identifier'], isset($validatorConfiguration['options']) ? $validatorConfiguration['options'] : []);
+                $this->createValidator($validatorConfiguration['identifier'], $validatorConfiguration['options'] ?? []);
             }
         }
 
@@ -182,7 +182,7 @@ abstract class AbstractRenderable implements RenderableInterface
         $validatorsDefinition = $this->getRootForm()->getValidatorsDefinition();
         if (isset($validatorsDefinition[$validatorIdentifier]) && is_array($validatorsDefinition[$validatorIdentifier]) && isset($validatorsDefinition[$validatorIdentifier]['implementationClassName'])) {
             $implementationClassName = $validatorsDefinition[$validatorIdentifier]['implementationClassName'];
-            $defaultOptions = isset($validatorsDefinition[$validatorIdentifier]['options']) ? $validatorsDefinition[$validatorIdentifier]['options'] : [];
+            $defaultOptions = $validatorsDefinition[$validatorIdentifier]['options'] ?? [];
 
             ArrayUtility::mergeRecursiveWithOverrule($defaultOptions, $options);
 
index cf284ea..43c01ab 100644 (file)
@@ -173,7 +173,7 @@ class DataStructureIdentifierHook
             return [];
         }
 
-        $prototypeName = isset($formDefinition['prototypeName']) ? $formDefinition['prototypeName'] : 'standard';
+        $prototypeName = $formDefinition['prototypeName'] ?? 'standard';
         $prototypeConfiguration = GeneralUtility::makeInstance(ObjectManager::class)
             ->get(ConfigurationService::class)
             ->getPrototypeConfiguration($prototypeName);
index a0b7c52..3b5acdf 100644 (file)
@@ -261,7 +261,7 @@ class FormPersistenceManager implements FormPersistenceManagerInterface
                 $form = $this->load($persistenceIdentifier);
                 $forms[] = [
                     'identifier' => $form['identifier'],
-                    'name' => isset($form['label']) ? $form['label'] : $form['identifier'],
+                    'name' => $form['label'] ?? $form['identifier'],
                     'persistenceIdentifier' => $persistenceIdentifier,
                     'readOnly' => $formReadOnly,
                     'removable' => true,
@@ -284,7 +284,7 @@ class FormPersistenceManager implements FormPersistenceManagerInterface
                 $form = $this->load($relativePath . $fileInfo->getFilename());
                 $forms[] = [
                     'identifier' => $form['identifier'],
-                    'name' => isset($form['label']) ? $form['label'] : $form['identifier'],
+                    'name' => $form['label'] ?? $form['identifier'],
                     'persistenceIdentifier' => $relativePath . $fileInfo->getFilename(),
                     'readOnly' => $this->formSettings['persistenceManager']['allowSaveToExtensionPaths'] ? false: true,
                     'removable' => $this->formSettings['persistenceManager']['allowDeleteFromExtensionPaths'] ? true: false,
index 16391ac..f0d996c 100644 (file)
@@ -71,7 +71,7 @@ class PropertyMappingConfiguration
                 UploadedFileReferenceConverter::CONFIGURATION_UPLOAD_CONFLICT_MODE => 'rename',
             ];
 
-            $saveToFileMountIdentifier = (isset($renderable->getProperties()['saveToFileMount'])) ? $renderable->getProperties()['saveToFileMount'] : '';
+            $saveToFileMountIdentifier = $renderable->getProperties()['saveToFileMount'] ?? '';
             if ($this->checkSaveFileMountAccess($saveToFileMountIdentifier)) {
                 $uploadConfiguration[UploadedFileReferenceConverter::CONFIGURATION_UPLOAD_FOLDER] = $saveToFileMountIdentifier;
             } else {
index cf592b0..2f746b2 100644 (file)
@@ -172,7 +172,7 @@ class RenderAllFormValuesViewHelper extends AbstractViewHelper
      */
     public static function mapValueToOption($value, array $options)
     {
-        return isset($options[$value]) ? $options[$value] : $value;
+        return $options[$value] ?? $value;
     }
 
     /**
index 7db1d6e..a80a681 100644 (file)
@@ -91,7 +91,7 @@ class RenderViewHelper extends AbstractViewHelper
         }
 
         if (empty($prototypeName)) {
-            $prototypeName = isset($overrideConfiguration['prototypeName']) ? $overrideConfiguration['prototypeName'] : 'standard';
+            $prototypeName = $overrideConfiguration['prototypeName'] ?? 'standard';
         }
 
         $factory = $objectManager->get($factoryClass);
index 40fa5d4..b24350b 100644 (file)
@@ -54,7 +54,7 @@ class ContentDataProcessor
                     );
                 }
 
-                $processorConfiguration = isset($processors[$key . '.']) ? $processors[$key . '.'] : [];
+                $processorConfiguration = $processors[$key . '.'] ?? [];
 
                 $variables = GeneralUtility::makeInstance($className)->process(
                     $cObject,
index 804fc54..4d58c1a 100644 (file)
@@ -788,7 +788,7 @@ class ContentObjectRenderer
         $content = '';
 
         // Evaluate possible cache and return
-        $cacheConfiguration = isset($configuration['cache.']) ? $configuration['cache.'] : null;
+        $cacheConfiguration = $configuration['cache.'] ?? null;
         if ($cacheConfiguration !== null) {
             unset($configuration['cache.']);
             $cache = $this->getFromCache($cacheConfiguration);
@@ -1158,7 +1158,7 @@ class ContentObjectRenderer
                 ];
 
                 if (isset($sourceConfiguration['quality']) || isset($sourceConfiguration['quality.'])) {
-                    $imageQuality = isset($sourceConfiguration['quality']) ? $sourceConfiguration['quality'] : '';
+                    $imageQuality = $sourceConfiguration['quality'] ?? '';
                     if (isset($sourceConfiguration['quality.'])) {
                         $imageQuality = $this->stdWrap($sourceConfiguration['quality'], $sourceConfiguration['quality.']);
                     }
@@ -1875,7 +1875,7 @@ class ContentObjectRenderer
      */
     public function stdWrap_ifNull($content = '', $conf = [])
     {
-        return $content !== null ? $content : $conf['ifNull'];
+        return $content ?? $conf['ifNull'];
     }
 
     /**
@@ -3422,13 +3422,13 @@ class ContentObjectRenderer
                     continue;
                 }
                 preg_match($chars < 0 ? $closingTagRegEx : $openingTagRegEx, $splittedContent[$offset], $matches);
-                $tagName = isset($matches[1]) ? $matches[1] : null;
+                $tagName = $matches[1] ?? null;
                 if ($tagName !== null) {
                     // Seek for the closing (or opening) tag.
                     $countSplittedContent = count($splittedContent);
                     for ($seekingOffset = $offset + 2; $seekingOffset < $countSplittedContent; $seekingOffset = $seekingOffset + 2) {
                         preg_match($chars < 0 ? $openingTagRegEx : $closingTagRegEx, $splittedContent[$seekingOffset], $matches);
-                        $seekingTagName = isset($matches[1]) ? $matches[1] : null;
+                        $seekingTagName = $matches[1] ?? null;
                         if ($tagName === $seekingTagName) {
                             // We found a matching tag.
                             // Add closing tag only if it occurs after the cropped content item.
@@ -3736,7 +3736,7 @@ class ContentObjectRenderer
         // return value directly by returnKey. No further processing
         if (!empty($valArr) && (MathUtility::canBeInterpretedAsInteger($conf['returnKey']) || $conf['returnKey.'])) {
             $key = isset($conf['returnKey.']) ? (int)$this->stdWrap($conf['returnKey'], $conf['returnKey.']) : (int)$conf['returnKey'];
-            return isset($valArr[$key]) ? $valArr[$key] : '';
+            return $valArr[$key] ?? '';
         }
 
         // return the amount of elements. No further processing
@@ -7178,9 +7178,7 @@ class ContentObjectRenderer
      */
     protected function calculateCacheLifetime(array $configuration)
     {
-        $lifetimeConfiguration = isset($configuration['lifetime'])
-            ? $configuration['lifetime']
-            : '';
+        $lifetimeConfiguration = $configuration['lifetime'] ?? '';
         $lifetimeConfiguration = isset($configuration['lifetime.'])
             ? $this->stdWrap($lifetimeConfiguration, $configuration['lifetime.'])
             : $lifetimeConfiguration;
@@ -7202,7 +7200,7 @@ class ContentObjectRenderer
      */
     protected function calculateCacheTags(array $configuration)
     {
-        $tags = isset($configuration['tags']) ? $configuration['tags'] : '';
+        $tags = $configuration['tags'] ?? '';
         $tags = isset($configuration['tags.'])
             ? $this->stdWrap($tags, $configuration['tags.'])
             : $tags;
@@ -7217,7 +7215,7 @@ class ContentObjectRenderer
      */
     protected function calculateCacheKey(array $configuration)
     {
-        $key = isset($configuration['key']) ? $configuration['key'] : '';
+        $key = $configuration['key'] ?? '';
         return isset($configuration['key.'])
             ? $this->stdWrap($key, $configuration['key.'])
             : $key;
index f1853b6..4ae1f67 100644 (file)
@@ -58,7 +58,7 @@ class ProductionExceptionHandler implements ExceptionHandlerInterface, LoggerAwa
                 throw $exception;
             }
         }
-        $errorMessage = isset($this->configuration['errorMessage']) ? $this->configuration['errorMessage'] : 'Oops, an error occurred! Code: %s';
+        $errorMessage = $this->configuration['errorMessage'] ?? 'Oops, an error occurred! Code: %s';
         $code = date('YmdHis', $_SERVER['REQUEST_TIME']) . GeneralUtility::makeInstance(Random::class)->generateRandomHexString(8);
 
         $this->logException($exception, $errorMessage, $code);
index 7ac2136..289ef93 100644 (file)
@@ -147,7 +147,7 @@ class FilesContentObject extends AbstractContentObject
             $sortingProperty = $this->cObj->stdWrapValue('sorting', $conf);
         }
         if ($sortingProperty !== '') {
-            $sortingDirection = isset($conf['sorting.']['direction']) ? $conf['sorting.']['direction'] : '';
+            $sortingDirection = $conf['sorting.']['direction'] ?? '';
             if (isset($conf['sorting.']['direction.'])) {
                 $sortingDirection = $this->cObj->stdWrap($sortingDirection, $conf['sorting.']['direction.']);
             }
index 93cec15..a6e19eb 100644 (file)
@@ -157,7 +157,7 @@ class FluidTemplateContentObject extends AbstractContentObject
             $templateRootPaths = $this->applyStandardWrapToFluidPaths($conf['templateRootPaths.']);
             $this->view->setTemplateRootPaths($templateRootPaths);
             $templateName = isset($conf['templateName.'])
-                ? $this->cObj->stdWrap(isset($conf['templateName']) ? $conf['templateName'] : '', $conf['templateName.'])
+                ? $this->cObj->stdWrap($conf['templateName'] ?? '', $conf['templateName.'])
                 : $conf['templateName'];
             $this->view->setTemplate($templateName);
         } elseif (!empty($conf['template']) && !empty($conf['template.'])) {
index 36a114b..395d438 100644 (file)
@@ -439,11 +439,11 @@ abstract class AbstractMenuContentObject
         $minItems = (int)($this->mconf['minItems'] ?: $this->conf['minItems']);
         $maxItems = (int)($this->mconf['maxItems'] ?: $this->conf['maxItems']);
         $begin = $this->parent_cObj->calc($this->mconf['begin'] ? $this->mconf['begin'] : $this->conf['begin']);
-        $minItemsConf = isset($this->mconf['minItems.']) ? $this->mconf['minItems.'] : (isset($this->conf['minItems.']) ? $this->conf['minItems.'] : null);
+        $minItemsConf = $this->mconf['minItems.'] ?? $this->conf['minItems.'] ?? null;
         $minItems = is_array($minItemsConf) ? $this->parent_cObj->stdWrap($minItems, $minItemsConf) : $minItems;
-        $maxItemsConf = isset($this->mconf['maxItems.']) ? $this->mconf['maxItems.'] : (isset($this->conf['maxItems.']) ? $this->conf['maxItems.'] : null);
+        $maxItemsConf = $this->mconf['maxItems.'] ?? $this->conf['maxItems.'] ?? null;
         $maxItems = is_array($maxItemsConf) ? $this->parent_cObj->stdWrap($maxItems, $maxItemsConf) : $maxItems;
-        $beginConf = isset($this->mconf['begin.']) ? $this->mconf['begin.'] : (isset($this->conf['begin.']) ? $this->conf['begin.'] : null);
+        $beginConf = $this->mconf['begin.'] ?? $this->conf['begin.'] ?? null;
         $begin = is_array($beginConf) ? $this->parent_cObj->stdWrap($begin, $beginConf) : $begin;
         $banUidArray = $this->getBannedUids();
         // Fill in the menuArr with elements that should go into the menu:
@@ -553,7 +553,7 @@ abstract class AbstractMenuContentObject
         $alternativeSortingField = trim($this->mconf['alternativeSortingField']) ?: 'sorting';
 
         // Additional where clause, usually starts with AND (as usual with all additionalWhere functionality in TS)
-        $additionalWhere = isset($this->mconf['additionalWhere']) ? $this->mconf['additionalWhere'] : '';
+        $additionalWhere = $this->mconf['additionalWhere'] ?? '';
         if (isset($this->mconf['additionalWhere.'])) {
             $additionalWhere = $this->parent_cObj->stdWrap($additionalWhere, $this->mconf['additionalWhere.']);
         }
@@ -1772,7 +1772,7 @@ abstract class AbstractMenuContentObject
                 ],
                 [
                     rawurlencode($LD['totalURL']),
-                    isset($page['_SHORTCUT_PAGE_UID']) ? $page['_SHORTCUT_PAGE_UID'] : $page['uid']
+                    $page['_SHORTCUT_PAGE_UID'] ?? $page['uid']
                 ],
                 $this->mconf['showAccessRestrictedPages.']['addParams']
             );
index f9912cd..d1f8a63 100644 (file)
@@ -106,8 +106,8 @@ EOF;
      */
     public function initialize()
     {
-        $fileUid = isset($this->request->getQueryParams()['file']) ? $this->request->getQueryParams()['file'] : null;
-        $parametersArray = isset($this->request->getQueryParams()['parameters']) ? $this->request->getQueryParams()['parameters'] : null;
+        $fileUid = $this->request->getQueryParams()['file'] ?? null;
+        $parametersArray = $this->request->getQueryParams()['parameters'] ?? null;
 
         // If no file-param or parameters are given, we must exit
         if (!$fileUid || !isset($parametersArray) || !is_array($parametersArray)) {
@@ -118,7 +118,7 @@ EOF;
         $parametersEncoded = implode('', $parametersArray);
 
         /* For backwards compatibility the HMAC is transported within the md5 param */
-        $hmacParameter = isset($this->request->getQueryParams()['md5']) ? $this->request->getQueryParams()['md5'] : null;
+        $hmacParameter = $this->request->getQueryParams()['md5'] ?? null;
         $hmac = GeneralUtility::hmac(implode('|', [$fileUid, $parametersEncoded]));
         if (!hash_equals($hmac, $hmacParameter)) {
             throw new \InvalidArgumentException('hash does not match', 1476048456);
@@ -135,7 +135,7 @@ EOF;
         } else {
             $this->file = ResourceFactory::getInstance()->retrieveFileOrFolderObject($fileUid);
         }
-        $this->frame = isset($this->request->getQueryParams()['frame']) ? $this->request->getQueryParams()['frame'] : null;
+        $this->frame = $this->request->getQueryParams()['frame'] ?? null;
     }
 
     /**
index c66298b..cd7dd18 100644 (file)
@@ -98,7 +98,7 @@ class FilesProcessor implements DataProcessorInterface
         if ($sortingProperty) {
             $sortingDirection = $cObj->stdWrapValue(
                 'direction',
-                isset($processorConfiguration['sorting.']) ? $processorConfiguration['sorting.'] : [],
+                $processorConfiguration['sorting.'] ?? [],
                 'ascending'
             );
 
index 8af138e..f9bd3b9 100644 (file)
@@ -105,9 +105,7 @@ class EidRequestHandler implements RequestHandlerInterface
         /** @var Response $response */
         $response = GeneralUtility::makeInstance(Response::class);
 
-        $eID = isset($request->getParsedBody()['eID'])
-            ? $request->getParsedBody()['eID']
-            : (isset($request->getQueryParams()['eID']) ? $request->getQueryParams()['eID'] : '');
+        $eID = $request->getParsedBody()['eID'] ?? $request->getQueryParams()['eID'] ?? '';
 
         if (empty($eID) || !isset($GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include'][$eID])) {
             return $response->withStatus(404, 'eID not registered');
index 9c9fd53..d4a4917 100644 (file)
@@ -355,8 +355,8 @@ class PageGenerator
             if (!empty($tsfe->pSetup['javascriptLibs.']['jQuery'])) {
                 $jQueryTS = $tsfe->pSetup['javascriptLibs.']['jQuery.'];
                 // Check if version / source is set, if not set variable to "NULL" to use the default of the page renderer
-                $version = isset($jQueryTS['version']) ? $jQueryTS['version'] : null;
-                $source = isset($jQueryTS['source']) ? $jQueryTS['source'] : null;
+                $version = $jQueryTS['version'] ?? null;
+                $source = $jQueryTS['source'] ?? null;
                 // When "noConflict" is not set or "1" enable the default jQuery noConflict mode, otherwise disable the namespace
                 if (!isset($jQueryTS['noConflict']) || !empty($jQueryTS['noConflict'])) {
                     $namespace = 'noConflict';
@@ -521,7 +521,7 @@ class PageGenerator
         $tsfe->generatePageTitle();
 
         static::generateMetaTagHtml(
-            isset($tsfe->pSetup['meta.']) ? $tsfe->pSetup['meta.'] : [],
+            $tsfe->pSetup['meta.'] ?? [],
             $tsfe->cObj
         );
 
@@ -866,7 +866,7 @@ class PageGenerator
         $conf = $typoScriptService->convertTypoScriptArrayToPlainArray($metaTagTypoScript);
         foreach ($conf as $key => $properties) {
             if (is_array($properties)) {
-                $nodeValue = isset($properties['_typoScriptNodeValue']) ? $properties['_typoScriptNodeValue'] : '';
+                $nodeValue = $properties['_typoScriptNodeValue'] ?? '';
                 $value = trim($cObj->stdWrap($nodeValue, $metaTagTypoScript[$key . '.']));
                 if ($value === '' && !empty($properties['value'])) {
                     $value = $properties['value'];
index 5b790ec..59178b7 100644 (file)
@@ -418,7 +418,7 @@ class PageRepository implements LoggerAwareInterface
     {
         $rows = $this->getPagesOverlay([$pageInput], $lUid);
         // Always an array in return
-        return isset($rows[0]) ? $rows[0] : [];
+        return $rows[0] ?? [];
     }
 
     /**
index f954b31..684f572 100644 (file)
@@ -49,7 +49,7 @@ class TypoLinkCodecService
         $reverseSortedParameters = array_reverse($this->decode(''), true);
         $aValueWasSet = false;
         foreach ($reverseSortedParameters as $key => &$value) {
-            $value = isset($typoLinkParts[$key]) ? $typoLinkParts[$key] : '';
+            $value = $typoLinkParts[$key] ?? '';
             // escape special character \ and "
             $value = str_replace([ '\\', '"' ], [ '\\\\', '\\"' ], $value);
             // enclose with quotes if a string contains the delimiter
index 33afc1a..19f87e4 100644 (file)
@@ -827,9 +827,7 @@ class AdminPanelView
         $tsfe = $this->getTypoScriptFrontendController();
         //  If mod.newContentElementWizard.override is set, use that extension's create new content wizard instead:
         $tsConfig = BackendUtility::getModTSconfig($tsfe->page['uid'], 'mod');
-        $moduleName = isset($tsConfig['properties']['newContentElementWizard.']['override'])
-            ? $tsConfig['properties']['newContentElementWizard.']['override']
-            : 'new_content_element';
+        $moduleName = $tsConfig['properties']['newContentElementWizard.']['override'] ?? 'new_content_element';
         /** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
         $uriBuilder = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Routing\UriBuilder::class);
         $newContentWizScriptPath = (string)$uriBuilder->buildUriFromRoute($moduleName);
index 19fe74d..ccd6e28 100644 (file)
@@ -590,7 +590,7 @@ class Import extends ImportExport
                 foreach ($pagesFromTree as $uid) {
                     $thisRec = $this->dat['header']['records']['pages'][$uid];
                     // PID: Set the main $pid, unless a NEW-id is found
-                    $setPid = isset($this->import_newId_pids[$thisRec['pid']]) ? $this->import_newId_pids[$thisRec['pid']] : $pid;
+                    $setPid = $this->import_newId_pids[$thisRec['pid']] ?? $pid;
                     $this->addSingle('pages', $uid, $setPid);
                     unset($pageRecords[$uid]);
                 }
@@ -764,7 +764,7 @@ class Import extends ImportExport
         }
         if (is_array($this->dat['header']['pid_lookup'])) {
             foreach ($this->dat['header']['pid_lookup'] as $pid => $recList) {
-                $newPid = isset($this->import_mapId['pages'][$pid]) ? $this->import_mapId['pages'][$pid] : $mainPid;
+                $newPid = $this->import_mapId['pages'][$pid] ?? $mainPid;
                 if (MathUtility::canBeInterpretedAsInteger($newPid)) {
                     foreach ($recList as $tableName => $uidList) {
                         // If $mainPid===$newPid then we are on root level and we can consider to move pages as well!
index f0c1e2b..6f609f9 100644 (file)
@@ -835,7 +835,7 @@ abstract class ImportExport
      */
     public function checkDokType($checkTable, $doktype)
     {
-        $allowedTableList = isset($GLOBALS['PAGES_TYPES'][$doktype]['allowedTables']) ? $GLOBALS['PAGES_TYPES'][$doktype]['allowedTables'] : $GLOBALS['PAGES_TYPES']['default']['allowedTables'];
+        $allowedTableList = $GLOBALS['PAGES_TYPES'][$doktype]['allowedTables'] ?? $GLOBALS['PAGES_TYPES']['default']['allowedTables'];
         $allowedArray = GeneralUtility::trimExplode(',', $allowedTableList, true);
         // If all tables or the table is listed as an allowed type, return TRUE
         if (strstr($allowedTableList, '*') || in_array($checkTable, $allowedArray)) {
@@ -865,7 +865,7 @@ abstract class ImportExport
             $cfg = $this->softrefCfg[$tokenID];
             if ($cfg['mode'] === 'editable') {
                 return (strlen($cfg['title']) ? '<strong>' . htmlspecialchars($cfg['title']) . '</strong><br/>' : '') . htmlspecialchars($cfg['description']) . '<br/>
-                                               <input type="text" name="tx_impexp[softrefInputValues][' . $tokenID . ']" value="' . htmlspecialchars((isset($this->softrefInputValues[$tokenID]) ? $this->softrefInputValues[$tokenID] : $cfg['defValue'])) . '" />';
+                                               <input type="text" name="tx_impexp[softrefInputValues][' . $tokenID . ']" value="' . htmlspecialchars(($this->softrefInputValues[$tokenID] ?? $cfg['defValue'])) . '" />';
             }
         }
 
index 167980c..1d77ec3 100644 (file)
@@ -1412,7 +1412,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
                     $this->settings['results']['pathExcludeDoktypes'] ?? '',
                     true
                 );
-                $breadcrumbWrap = isset($this->settings['breadcrumbWrap']) ? $this->settings['breadcrumbWrap'] : '/';
+                $breadcrumbWrap = $this->settings['breadcrumbWrap'] ?? '/';
                 $breadcrumbWraps = GeneralUtility::makeInstance(TypoScriptService::class)
                     ->explodeConfigurationForOptionSplit(['wrap' => $breadcrumbWrap], $pageCount);
                 foreach ($rl as $k => $v) {
index e3ffce7..3098ee5 100644 (file)
@@ -191,7 +191,7 @@ class IndexSearchRepository
         $this->sections = $searchData['sections'];
         $this->searchType = $searchData['searchType'];
         $this->languageUid = $searchData['languageUid'];
-        $this->mediaType = isset($searchData['mediaType']) ? $searchData['mediaType'] : false;
+        $this->mediaType = $searchData['mediaType'] ?? false;
         $this->sortOrder = $searchData['sortOrder'];
         $this->descendingSortOrderFlag = $searchData['desc'];
         $this->resultpagePointer = $searchData['pointer'];
index f4afc54..35f5ec5 100644 (file)
@@ -303,14 +303,14 @@ class Indexer
                             // Alternative title for indexing
                             $this->conf['metaCharset'] = $pObj->metaCharset;
                             // Character set of content (will be converted to utf-8 during indexing)
-                            $this->conf['mtime'] = isset($pObj->register['SYS_LASTCHANGED']) ? $pObj->register['SYS_LASTCHANGED'] : $pObj->page['SYS_LASTCHANGED'];
+                            $this->conf['mtime'] = $pObj->register['SYS_LASTCHANGED'] ?? $pObj->page['SYS_LASTCHANGED'];
                             // Most recent modification time (seconds) of the content on the page. Used to evaluate whether it should be re-indexed.
                             // Configuration of behavior:
                             $this->conf['index_externals'] = $pObj->config['config']['index_externals'];
                             // Whether to index external documents like PDF, DOC etc. (if possible)
                             $this->conf['index_descrLgd'] = $pObj->config['config']['index_descrLgd'];
                             // Length of description text (max 250, default 200)
-                            $this->conf['index_metatags'] = isset($pObj->config['config']['index_metatags']) ? $pObj->config['config']['index_metatags'] : true;
+                            $this->conf['index_metatags'] = $pObj->config['config']['index_metatags'] ?? true;
                             // Set to zero:
                             $this->conf['recordUid'] = 0;
                             $this->conf['freeIndexUid'] = 0;
@@ -611,7 +611,7 @@ class Indexer
         // get title
         $this->embracingTags($headPart, 'TITLE', $contentArr['title'], $dummy2, $dummy);
         $titleParts = explode(':', $contentArr['title'], 2);
-        $contentArr['title'] = trim(isset($titleParts[1]) ? $titleParts[1] : $titleParts[0]);
+        $contentArr['title'] = trim($titleParts[1] ?? $titleParts[0]);
         // get keywords and description metatags
         if ($this->conf['index_metatags']) {
             $meta = [];
index df1a28b..7217cb6 100644 (file)
@@ -47,7 +47,7 @@ class LocalConfigurationValueService
             if (isset($commentArray[$sectionName])) {
                 $data[$sectionName] = $this->recursiveConfigurationFetching(
                     $section,
-                    isset($GLOBALS['TYPO3_CONF_VARS'][$sectionName]) ? $GLOBALS['TYPO3_CONF_VARS'][$sectionName] : null,
+                    $GLOBALS['TYPO3_CONF_VARS'][$sectionName] ?? null,
                     $commentArray[$sectionName]
                 );
             }
index b538f0e..1317e12 100644 (file)
@@ -398,7 +398,7 @@ class ValidatorTask extends AbstractTask
                 $searchFields[$table][] = $field;
             }
         }
-        return isset($searchFields) ? $searchFields : [];
+        return $searchFields ?? [];
     }
 
     /**
index 99580db..6fadd03 100644 (file)
@@ -201,7 +201,7 @@ class OpendocsToolbarItem implements ToolbarItemInterface
      */
     public function closeDocument(ServerRequestInterface $request, ResponseInterface $response)
     {
-        $md5sum = isset($request->getParsedBody()['md5sum']) ? $request->getParsedBody()['md5sum'] : $request->getQueryParams()['md5sum'];
+        $md5sum = $request->getParsedBody()['md5sum'] ?? $request->getQueryParams()['md5sum'];
         if ($md5sum && isset($this->openDocs[$md5sum])) {
             $backendUser = $this->getBackendUser();
             // Add the document to be closed to the recent documents
index 2a6285c..32377d9 100644 (file)
@@ -297,7 +297,7 @@ class DatabaseBrowser extends AbstractElementBrowser implements ElementBrowserIn
      */
     public function getUrlParameters(array $values)
     {
-        $pid = isset($values['pid']) ? $values['pid'] : $this->expandPage;
+        $pid = $values['pid'] ?? $this->expandPage;
         return [
             'mode' => 'db',
             'expandPage' => $pid,
index 05cba75..bf48674 100644 (file)
@@ -469,7 +469,7 @@ class FileBrowser extends AbstractElementBrowser implements ElementBrowserInterf
     {
         return [
             'mode' => 'file',
-            'expandFolder' => isset($values['identifier']) ? $values['identifier'] : $this->expandFolder,
+            'expandFolder' => $values['identifier'] ?? $this->expandFolder,
             'bparams' => $this->bparams
         ];
     }
index 619d5b4..2d4c3bc 100644 (file)
@@ -215,7 +215,7 @@ class FolderBrowser extends AbstractElementBrowser implements ElementBrowserInte
     {
         return [
             'mode' => 'folder',
-            'expandFolder' => isset($values['identifier']) ? $values['identifier'] : $this->expandFolder,
+            'expandFolder' => $values['identifier'] ?? $this->expandFolder,
             'bparams' => $this->bparams
         ];
     }
index 7cf137e..5caa794 100644 (file)
@@ -214,9 +214,9 @@ abstract class AbstractLinkBrowserController
     protected function initVariables(ServerRequestInterface $request)
     {
         $queryParams = $request->getQueryParams();
-        $this->displayedLinkHandlerId = isset($queryParams['act']) ? $queryParams['act'] : '';
-        $this->parameters = isset($queryParams['P']) ? $queryParams['P'] : [];
-        $this->linkAttributeValues = isset($queryParams['linkAttributes']) ? $queryParams['linkAttributes'] : [];
+        $this->displayedLinkHandlerId = $queryParams['act'] ?? '';
+        $this->parameters = $queryParams['P'] ?? [];
+        $this->linkAttributeValues = $queryParams['linkAttributes'] ?? [];
     }
 
     /**
@@ -242,7 +242,7 @@ abstract class AbstractLinkBrowserController
             $handler->initialize(
                 $this,
                 $identifier,
-                isset($configuration['configuration.']) ? $configuration['configuration.'] : []
+                $configuration['configuration.'] ?? []
             );
 
             $label = !empty($configuration['label']) ? $lang->sL($configuration['label']) : '';
@@ -254,7 +254,7 @@ abstract class AbstractLinkBrowserController
                 'displayAfter' => isset($configuration['displayAfter']) ? GeneralUtility::trimExplode(',', $configuration['displayAfter']) : [],
                 'scanBefore' => isset($configuration['scanBefore']) ? GeneralUtility::trimExplode(',', $configuration['scanBefore']) : [],
                 'scanAfter' => isset($configuration['scanAfter']) ? GeneralUtility::trimExplode(',', $configuration['scanAfter']) : [],
-                'addParams' => isset($configuration['addParams']) ? $configuration['addParams'] : '',
+                'addParams' => $configuration['addParams'] ?? '',
             ];
         }
     }
@@ -559,7 +559,7 @@ abstract class AbstractLinkBrowserController
     public function getUrlParameters(array $overrides = null)
     {
         return [
-            'act' => isset($overrides['act']) ? $overrides['act'] : $this->displayedLinkHandlerId
+            'act' => $overrides['act'] ?? $this->displayedLinkHandlerId
         ];
     }
 
@@ -575,9 +575,9 @@ abstract class AbstractLinkBrowserController
         $parameters['pid'] = $this->parameters['pid'];
         $parameters['itemName'] = $this->parameters['itemName'];
         $parameters['formName'] = $this->parameters['formName'];
-        $parameters['params']['allowedExtensions'] = isset($this->parameters['params']['allowedExtensions']) ? $this->parameters['params']['allowedExtensions'] : '';
-        $parameters['params']['blindLinkOptions'] = isset($this->parameters['params']['blindLinkOptions']) ? $this->parameters['params']['blindLinkOptions'] : '';
-        $parameters['params']['blindLinkFields'] = isset($this->parameters['params']['blindLinkFields']) ? $this->parameters['params']['blindLinkFields']: '';
+        $parameters['params']['allowedExtensions'] = $this->parameters['params']['allowedExtensions'] ?? '';
+        $parameters['params']['blindLinkOptions'] = $this->parameters['params']['blindLinkOptions'] ?? '';
+        $parameters['params']['blindLinkFields'] = $this->parameters['params']['blindLinkFields'] ?? '';
         $addPassOnParams = GeneralUtility::implodeArrayForUrl('P', $parameters);
 
         $attributes = $this->displayedLinkHandler->getBodyTagAttributes();
index bf6d8ac..4025b61 100644 (file)
@@ -103,7 +103,7 @@ class FileLinkHandler extends AbstractLinkHandler implements LinkHandlerInterfac
         $folderTree->setLinkParameterProvider($this);
         $this->view->assign('tree', $folderTree->getBrowsableTree());
 
-        $this->expandFolder = isset($request->getQueryParams()['expandFolder']) ? $request->getQueryParams()['expandFolder'] : null;
+        $this->expandFolder = $request->getQueryParams()['expandFolder'] ?? null;
         if (!empty($this->linkParts) && !isset($this->expandFolder)) {
             $this->expandFolder = $this->linkParts['url'][$this->mode];
             if ($this->expandFolder instanceof File) {
index 9609ca8..0b0f430 100644 (file)
@@ -1643,9 +1643,7 @@ class DatabaseRecordList
                             if ($table === 'tt_content' && $this->newWizards) {
                                 // If mod.newContentElementWizard.override is set, use that extension's create new content wizard instead:
                                 $tmpTSc = BackendUtility::getModTSconfig($this->pageinfo['uid'], 'mod');
-                                $newContentElementWizard = isset($tmpTSc['properties']['newContentElementWizard.']['override'])
-                                    ? $tmpTSc['properties']['newContentElementWizard.']['override']
-                                    : 'new_content_element';
+                                $newContentElementWizard = $tmpTSc['properties']['newContentElementWizard.']['override'] ?? 'new_content_element';
                                 $newContentWizScriptPath = (string)$uriBuilder->buildUriFromRoute($newContentElementWizard, ['id' => $this->id]);
 
                                 $onClick = 'return jumpExt(' . GeneralUtility::quoteJSvalue($newContentWizScriptPath) . ');';
@@ -2051,7 +2049,7 @@ class DatabaseRecordList
             }
             // "Delete" link:
             $disableDeleteTS = $this->getBackendUserAuthentication()->getTSConfig('options.disableDelete');
-            $disableDelete = (bool) trim(isset($disableDeleteTS['properties'][$table]) ? $disableDeleteTS['properties'][$table] : $disableDeleteTS['value']);
+            $disableDelete = (bool) trim($disableDeleteTS['properties'][$table] ?? $disableDeleteTS['value']);
             if ($permsEdit && !$disableDelete && ($table === 'pages' && $localCalcPerms & Permission::PAGE_DELETE || $table !== 'pages' && $this->calcPerms & Permission::CONTENT_EDIT)) {
                 // Check if the record version is in "deleted" state, because that will switch the action to "restore"
                 if ($this->getBackendUserAuthentication()->workspace > 0 && isset($row['t3ver_state']) && (int)$row['t3ver_state'] === 2) {
index f42f28a..0f8ece5 100644 (file)
@@ -42,7 +42,7 @@ class SessionStorage extends AbstractStorage
      */
     public function get()
     {
-        return isset($_SESSION['tx_rsaauth_key']) ? $_SESSION['tx_rsaauth_key'] : null;
+        return $_SESSION['tx_rsaauth_key'] ?? null;
     }
 
     /**
index 534f5d9..840d8ca 100644 (file)
@@ -256,11 +256,7 @@ class BrowseLinksController extends AbstractLinkBrowserController
         // Default target
         $this->defaultLinkTarget = $this->classesAnchorDefault[$this->displayedLinkHandlerId] && $this->classesAnchorDefaultTarget[$this->displayedLinkHandlerId]
             ? $this->classesAnchorDefaultTarget[$this->displayedLinkHandlerId]
-            : (isset($this->buttonConfig[$this->displayedLinkHandlerId]['properties']['target']['default'])
-                ? $this->buttonConfig[$this->displayedLinkHandlerId]['properties']['target']['default']
-                : (isset($this->buttonConfig['properties']['target']['default'])
-                    ? $this->buttonConfig['properties']['target']['default']
-                    : ''));
+            : ($this->buttonConfig[$this->displayedLinkHandlerId]['properties']['target']['default'] ?? $this->buttonConfig['properties']['target']['default'] ?? '');
 
         // todo: find new name for this option
         // Initializing additional attributes
@@ -551,7 +547,7 @@ class BrowseLinksController extends AbstractLinkBrowserController
     public function getUrlParameters(array $overrides = null)
     {
         return [
-            'act' => isset($overrides['act']) ? $overrides['act'] : $this->displayedLinkHandlerId,
+            'act' => $overrides['act'] ?? $this->displayedLinkHandlerId,
             'editorId' => $this->editorId,
             'contentsLanguage' => $this->contentsLanguage,
             'P' => $this->parameters
index 58b0cd6..34c4be4 100644 (file)
@@ -127,7 +127,7 @@ class BlowfishSalt extends Md5Salt
      */
     public function getHashCount(): int
     {
-        return isset(self::$hashCount) ? self::$hashCount : self::HASH_COUNT;
+        return self::$hashCount ?? self::HASH_COUNT;
     }
 
     /**
@@ -140,7 +140,7 @@ class BlowfishSalt extends Md5Salt
      */
     public function getMaxHashCount(): int
     {
-        return isset(self::$maxHashCount) ? self::$maxHashCount : self::MAX_HASH_COUNT;
+        return self::$maxHashCount ?? self::MAX_HASH_COUNT;
     }
 
     /**
@@ -163,7 +163,7 @@ class BlowfishSalt extends Md5Salt
      */
     public function getMinHashCount(): int
     {
-        return isset(self::$minHashCount) ? self::$minHashCount : self::MIN_HASH_COUNT;
+        return self::$minHashCount ?? self::MIN_HASH_COUNT;
     }
 
     /**
index 04fd93b..1411f09 100644 (file)
@@ -210,7 +210,7 @@ class Pbkdf2Salt extends AbstractComposedSalt
      */
     public function getHashCount(): int
     {
-        return isset(self::$hashCount) ? self::$hashCount : self::HASH_COUNT;
+        return self::$hashCount ?? self::HASH_COUNT;
     }
 
     /**
@@ -223,7 +223,7 @@ class Pbkdf2Salt extends AbstractComposedSalt
      */
     public function getMaxHashCount(): int
     {
-        return isset(self::$maxHashCount) ? self::$maxHashCount : self::MAX_HASH_COUNT;
+        return self::$maxHashCount ?? self::MAX_HASH_COUNT;
     }
 
     /**
@@ -246,7 +246,7 @@ class Pbkdf2Salt extends AbstractComposedSalt
      */
     public function getMinHashCount(): int
     {
-        return isset(self::$minHashCount) ? self::$minHashCount : self::MIN_HASH_COUNT;
+        return self::$minHashCount ?? self::MIN_HASH_COUNT;
     }
 
     /**
index f2553d6..96ec050 100644 (file)
@@ -216,7 +216,7 @@ class PhpassSalt extends AbstractComposedSalt
      */
     public function getHashCount(): int
     {
-        return isset(self::$hashCount) ? self::$hashCount : self::HASH_COUNT;
+        return self::$hashCount ?? self::HASH_COUNT;
     }
 
     /**
@@ -258,7 +258,7 @@ class PhpassSalt extends AbstractComposedSalt
      */
     public function getMaxHashCount(): int
     {
-        return isset(self::$maxHashCount) ? self::$maxHashCount : self::MAX_HASH_COUNT;
+        return self::$maxHashCount ?? self::MAX_HASH_COUNT;
     }
 
     /**
@@ -271,7 +271,7 @@ class PhpassSalt extends AbstractComposedSalt
      */
     public function getMinHashCount(): int
     {
-        return isset(self::$minHashCount) ? self::$minHashCount : self::MIN_HASH_COUNT;
+        return self::$minHashCount ?? self::MIN_HASH_COUNT;
     }
 
     /**
index 97eaa6b..99dcf60 100644 (file)
@@ -1263,7 +1263,7 @@ class SchedulerModuleController
                 'extension' => $registrationInformation['extension'],
                 'title' => $title,
                 'description' => $description,
-                'provider' => isset($registrationInformation['additionalFields']) ? $registrationInformation['additionalFields'] : ''
+                'provider' => $registrationInformation['additionalFields'] ?? ''
             ];
         }
         return $list;
index 8d88114..d234e82 100644 (file)
@@ -47,7 +47,7 @@ class CodeCompletion
      */
     public function processAjaxRequest(ServerRequestInterface $request, ResponseInterface $response)
     {
-        $pageId = (int)(isset($request->getParsedBody()['pageId']) ? $request->getParsedBody()['pageId'] : $request->getQueryParams()['pageId']);
+        $pageId = (int)($request->getParsedBody()['pageId'] ?? $request->getQueryParams()['pageId']);
         return $this->loadTemplates($pageId);
     }
 
index b5749a9..59322eb 100644 (file)
@@ -32,9 +32,9 @@ class TaskStatus
     public function saveCollapseState(ServerRequestInterface $request, ResponseInterface $response)
     {
         // Remove 'el_' in the beginning which is needed for the saveSortingState()
-        $item = isset($request->getParsedBody()['item']) ? $request->getParsedBody()['item'] : $request->getQueryParams()['item'];
+        $item = $request->getParsedBody()['item'] ?? $request->getQueryParams()['item'];
         $item = htmlspecialchars($item);
-        $state = (bool)(isset($request->getParsedBody()['state']) ? $request->getParsedBody()['state'] : $request->getQueryParams()['state']);
+        $state = (bool)($request->getParsedBody()['state'] ?? $request->getQueryParams()['state']);
 
         $this->getBackendUserAuthentication()->uc['taskcenter']['states'][$item] = $state;
         $this->getBackendUserAuthentication()->writeUC();
@@ -52,7 +52,7 @@ class TaskStatus
     public function saveSortingState(ServerRequestInterface $request, ResponseInterface $response)
     {
         $sort = [];
-        $data = isset($request->getParsedBody()['data']) ? $request->getParsedBody()['data'] : $request->getQueryParams()['data'];
+        $data = $request->getParsedBody()['data'] ?? $request->getQueryParams()['data'];
 
         $items = explode('&', $data);
         foreach ($items as $item) {
index 76751ff..d3aeebb 100644 (file)
@@ -144,7 +144,7 @@ class ViewModuleController extends ActionController
         $icons['unidentified'] = $iconFactory->getIcon('actions-device-unidentified', Icon::SIZE_SMALL)->render('inline');
 
         $current = ($this->getBackendUser()->uc['moduleData']['web_view']['States']['current'] ?: []);
-        $current['label'] = (isset($current['label']) ? $current['label'] : $this->getLanguageService()->sL('LLL:EXT:viewpage/Resources/Private/Language/locallang.xlf:custom'));
+        $current['label'] = ($current['label'] ?? $this->getLanguageService()->sL('LLL:EXT:viewpage/Resources/Private/Language/locallang.xlf:custom'));
         $current['width'] = (isset($current['width']) && (int) $current['width'] >= 300 ? (int) $current['width'] : 320);
         $current['height'] = (isset($current['height']) && (int) $current['height'] >= 300 ? (int) $current['height'] : 480);
 
@@ -276,8 +276,8 @@ class ViewModuleController extends ActionController
             foreach ($modTSconfig['properties']['previewFrameWidths.'] as $item => $conf) {
                 $data = [
                     'key' => substr($item, 0, -1),
-                    'label' => (isset($conf['label']) ? $conf['label'] : null),
-                    'type' => (isset($conf['type']) ? $conf['type'] : 'unknown'),
+                    'label' => ($conf['label'] ?? null),
+                    'type' => ($conf['type'] ?? 'unknown'),
                     'width' => ((isset($conf['width']) && (int) $conf['width'] > 0 && strpos($conf['width'], '%') === false) ? (int) $conf['width'] : null),
                     'height' => ((isset($conf['height']) && (int) $conf['height'] > 0 && strpos($conf['height'], '%') === false) ? (int) $conf['height'] : null),
                 ];
index e624061..4d87a5e 100644 (file)
@@ -36,8 +36,8 @@ class AjaxController
     {
         $parsedBody = $request->getParsedBody();
         $queryParams = $request->getQueryParams();
-        $workspaceId = (int)(isset($parsedBody['workspaceId']) ? $parsedBody['workspaceId'] : $queryParams['workspaceId']);
-        $pageId = (int)(isset($parsedBody['pageId']) ? $parsedBody['pageId'] : $queryParams['pageId']);
+        $workspaceId = (int)($parsedBody['workspaceId'] ?? $queryParams['workspaceId']);
+        $pageId = (int)($parsedBody['pageId'] ?? $queryParams['pageId']);
         $finalPageUid = 0;
         $originalPageId = $pageId;
 
index 08a36ed..f6b46dc 100644 (file)
@@ -356,7 +356,7 @@ class ActionHandler extends AbstractHandler
                 $uc = $beUserRecord['uc'] ? unserialize($beUserRecord['uc']) : [];
                 $recipients[$beUserRecord['email']] = [
                     'email' => $beUserRecord['email'],
-                    'lang' => isset($uc['lang']) ? $uc['lang'] : $beUserRecord['lang']
+                    'lang' => $uc['lang'] ?? $beUserRecord['lang']
                 ];
             }
         }
@@ -374,7 +374,7 @@ class ActionHandler extends AbstractHandler
                     $uc = (!empty($preselectedBackendUser['uc']) ? unserialize($preselectedBackendUser['uc']) : []);
                     $recipients[$preselectedBackendUser['email']] = [
                         'email' => $preselectedBackendUser['email'],
-                        'lang' => (isset($uc['lang']) ? $uc['lang'] : $preselectedBackendUser['lang'])
+                        'lang' => ($uc['lang'] ?? $preselectedBackendUser['lang'])
                     ];
                 }
             }
index 910c7f6..a04db98 100644 (file)
@@ -94,11 +94,11 @@ class GridDataService implements LoggerAwareInterface
     public function generateGridListFromVersions($versions, $parameter, $currentWorkspace)
     {
         // Read the given parameters from grid. If the parameter is not set use default values.
-        $filterTxt = isset($parameter->filterTxt) ? $parameter->filterTxt : '';
+        $filterTxt = $parameter->filterTxt ?? '';
         $start = isset($parameter->start) ? (int)$parameter->start : 0;
         $limit = isset($parameter->limit) ? (int)$parameter->limit : 30;
-        $this->sort = isset($parameter->sort) ? $parameter->sort : 't3ver_oid';
-        $this->sortDir = isset($parameter->dir) ? $parameter->dir : 'ASC';
+        $this->sort = $parameter->sort ?? 't3ver_oid';
+        $this->sortDir = $parameter->dir ?? 'ASC';
         if (is_int($currentWorkspace)) {
             $this->currentWorkspace = $currentWorkspace;
         } else {