[TASK] Remove redundant parentheses 22/58122/3
authorWouter Wolters <typo3@wouterwolters.nl>
Sun, 2 Sep 2018 10:27:39 +0000 (12:27 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 2 Sep 2018 11:49:51 +0000 (13:49 +0200)
Resolves: #86082
Releases: master
Change-Id: I4698f5f6b2a5b6995588d25b9cac3ec875e15b93
Reviewed-on: https://review.typo3.org/58122
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/ContextMenu/ItemProviders/RecordProvider.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/core/Classes/MetaTag/AbstractMetaTagManager.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/install/Classes/Service/CoreVersionService.php
typo3/sysext/linkvalidator/Classes/Report/LinkValidatorReport.php

index c2f0ed6..1cf6adb 100644 (file)
@@ -461,7 +461,7 @@ class RecordProvider extends AbstractProvider
     protected function canShowHistory(): bool
     {
         $userTsConfig = $this->backendUser->getTSConfig();
-        return (bool)(\trim($userTsConfig['options.']['showHistory.'][$this->table] ?? $userTsConfig['options.']['showHistory'] ?? '1'));
+        return (bool)trim($userTsConfig['options.']['showHistory.'][$this->table] ?? $userTsConfig['options.']['showHistory'] ?? '1');
     }
 
     /**
index ea337b2..79d027f 100644 (file)
@@ -2491,7 +2491,7 @@ class BackendUtility
             $helpText = self::helpText($table, $field);
         }
         // If there's a help text or some overload information, proceed with preparing an output
-        if ((!empty($helpText) || $hasHelpTextOverload)) {
+        if (!empty($helpText) || $hasHelpTextOverload) {
             // If no text was given, just use the regular help icon
             if ($text == '') {
                 $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
index 34a314c..9a09b5c 100644 (file)
@@ -109,7 +109,7 @@ abstract class AbstractMetaTagManager implements MetaTagManagerInterface, Single
             $subPropertiesArray = [];
             foreach ($subProperties as $subPropertyKey => $subPropertyValue) {
                 if (isset($this->handledProperties[$property]['allowedSubProperties'][$subPropertyKey])) {
-                    $subPropertiesArray[$subPropertyKey] = (is_array($subPropertyValue)) ? $subPropertyValue : [$subPropertyValue];
+                    $subPropertiesArray[$subPropertyKey] = is_array($subPropertyValue) ? $subPropertyValue : [$subPropertyValue];
                 }
             }
             if (!isset($this->properties[$property]) || empty($this->properties[$property])) {
index beacf0f..186f419 100644 (file)
@@ -2701,7 +2701,7 @@ class GeneralUtility
                         ? (($_SERVER['ORIG_PATH_INFO'] ?? '') ?: ($_SERVER['PATH_INFO'] ?? ''))
                         : (($_SERVER['ORIG_SCRIPT_NAME'] ?? '') ?: ($_SERVER['SCRIPT_NAME'] ?? ''));
                 // Add a prefix if TYPO3 is behind a proxy: ext-domain.com => int-server.com/prefix
-                if (self::cmpIP(($_SERVER['REMOTE_ADDR'] ?? ''), $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'])) {
+                if (self::cmpIP($_SERVER['REMOTE_ADDR'] ?? '', $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'])) {
                     if (self::getIndpEnv('TYPO3_SSL') && $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefixSSL']) {
                         $retVal = $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefixSSL'] . $retVal;
                     } elseif ($GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefix']) {
index 6f0726e..8f465a5 100644 (file)
@@ -226,7 +226,7 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface
      */
     protected function getControlSection($tableName)
     {
-        return ((isset($GLOBALS['TCA'][$tableName]['ctrl'])) && is_array($GLOBALS['TCA'][$tableName]['ctrl']))
+        return (isset($GLOBALS['TCA'][$tableName]['ctrl']) && is_array($GLOBALS['TCA'][$tableName]['ctrl']))
             ? $GLOBALS['TCA'][$tableName]['ctrl']
             : null;
     }
index cc526c3..64ffa5e 100644 (file)
@@ -3076,7 +3076,7 @@ class ContentObjectRenderer implements LoggerAwareInterface
         if ($flag) {
             $value = isset($conf['value.'])
                 ? trim($this->stdWrap($conf['value'] ?? '', $conf['value.']))
-                : (trim($conf['value'] ?? ''));
+                : trim($conf['value'] ?? '');
             if (isset($conf['isGreaterThan']) || isset($conf['isGreaterThan.'])) {
                 $number = isset($conf['isGreaterThan.']) ? trim($this->stdWrap($conf['isGreaterThan'], $conf['isGreaterThan.'])) : trim($conf['isGreaterThan']);
                 if ($number <= $value) {
index 46c9f4f..ab8f777 100644 (file)
@@ -207,7 +207,7 @@ class CoreVersionService
         $installedMajorVersion = (int)$this->getInstalledMajorVersion();
 
         foreach ($versionArray as $versionNumber => $versionDetails) {
-            if (is_array($versionDetails) && (int)($this->getMajorVersion((string)$versionNumber)) < $installedMajorVersion) {
+            if (is_array($versionDetails) && (int)$this->getMajorVersion((string)$versionNumber) < $installedMajorVersion) {
                 unset($versionArray[$versionNumber]);
             }
         }
index 42918fd..493b056 100644 (file)
@@ -674,7 +674,7 @@ class LinkValidatorReport extends \TYPO3\CMS\Backend\Module\AbstractFunctionModu
 
                         $translation = $this->getLanguageService()->getLL('hooks.' . $type) ?: $type;
 
-                        $checked = ($this->checkOpt[$prefix][$type]) ? 'checked="checked"' : '';
+                        $checked = $this->checkOpt[$prefix][$type] ? 'checked="checked"' : '';
 
                         $hookSectionMarker['option'] = '<input type="checkbox"' . $additionalAttr
                             . ' id="' . $prefix . '_SET_' . $type