diff --git a/Build/phpstan/phpstan-baseline.neon b/Build/phpstan/phpstan-baseline.neon index c5cb2fd05a11ab1ddbd8ff986042ed90fbc2965d..d09ba1ee9c2658c34f96eb25bed60c89f8a15aa8 100644 --- a/Build/phpstan/phpstan-baseline.neon +++ b/Build/phpstan/phpstan-baseline.neon @@ -125,11 +125,6 @@ parameters: count: 1 path: ../../typo3/sysext/backend/Classes/Form/Wizard/SuggestWizardDefaultReceiver.php - - - message: "#^Left side of && is always true\\.$#" - count: 1 - path: ../../typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php - - message: "#^Call to function is_array\\(\\) with int\\|string will always evaluate to false\\.$#" count: 2 @@ -310,11 +305,6 @@ parameters: count: 1 path: ../../typo3/sysext/backend/Classes/View/Drawing/BackendLayoutRenderer.php - - - message: "#^Left side of && is always true\\.$#" - count: 1 - path: ../../typo3/sysext/backend/Classes/View/PageLayoutView.php - - message: "#^Variable \\$localizationButtons in empty\\(\\) always exists and is not falsy\\.$#" count: 1 @@ -1160,11 +1150,6 @@ parameters: count: 1 path: ../../typo3/sysext/core/Classes/LinkHandling/LinkService.php - - - message: "#^Left side of && is always true\\.$#" - count: 1 - path: ../../typo3/sysext/core/Classes/LinkHandling/LinkService.php - - message: "#^Result of \\|\\| is always true\\.$#" count: 1 @@ -4340,11 +4325,6 @@ parameters: count: 1 path: ../../typo3/sysext/frontend/Classes/ContentObject/LoadRegisterContentObject.php - - - message: "#^Left side of && is always true\\.$#" - count: 1 - path: ../../typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php - - message: "#^Method TYPO3\\\\CMS\\\\Frontend\\\\ContentObject\\\\Menu\\\\AbstractMenuContentObject\\:\\:getCurrentSite\\(\\) should return TYPO3\\\\CMS\\\\Core\\\\Site\\\\Entity\\\\Site but returns TYPO3\\\\CMS\\\\Core\\\\Site\\\\Entity\\\\SiteInterface\\.$#" count: 1 diff --git a/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php b/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php index 37b643c0b3d54977c441f87341b0c60f5f269a9d..332aa43697a243a68787b278d270d6193b2f78cc 100644 --- a/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php +++ b/typo3/sysext/backend/Classes/Middleware/BackendUserAuthenticator.php @@ -243,7 +243,7 @@ class BackendUserAuthenticator extends \TYPO3\CMS\Core\Middleware\BackendUserAut } $loginRateLimiter = $this->rateLimiterFactory->createLoginRateLimiter($user, $request); $limit = $loginRateLimiter->consume(); - if ($limit && !$limit->isAccepted()) { + if (!$limit->isAccepted()) { $this->logger->debug('Login request has been rate limited for IP address {ipAddress}', ['ipAddress' => $request->getAttribute('normalizedParams')->getRemoteAddress()]); $dateformat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']; $lockedUntil = $limit->getRetryAfter()->getTimestamp() > 0 ? diff --git a/typo3/sysext/backend/Classes/View/PageLayoutView.php b/typo3/sysext/backend/Classes/View/PageLayoutView.php index 4dd544ab7d1c113272fc7373b23c23ac93e32976..11f5dfea240f4b8bdd8ae33aefe3ad79b41b10ab 100644 --- a/typo3/sysext/backend/Classes/View/PageLayoutView.php +++ b/typo3/sysext/backend/Classes/View/PageLayoutView.php @@ -1022,7 +1022,7 @@ class PageLayoutView implements LoggerAwareInterface . ' data-button-close-text="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')) . '"' . ' title="' . htmlspecialchars($this->getLanguageService()->getLL('deleteItem')) . '">' . $this->iconFactory->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render() . '</a>'; - if ($out && $this->hasContentModificationAndAccessPermissions()) { + if ($this->hasContentModificationAndAccessPermissions()) { $out = '<div class="btn-group btn-group-sm" role="group">' . $out . '</div>'; } else { $out = ''; diff --git a/typo3/sysext/core/Classes/LinkHandling/LinkService.php b/typo3/sysext/core/Classes/LinkHandling/LinkService.php index 0044af62641b28d983952d34baae39abcd5f2cd7..5e41f8111c9402cccc2ddaa4984bc6e67e726d2c 100644 --- a/typo3/sysext/core/Classes/LinkHandling/LinkService.php +++ b/typo3/sysext/core/Classes/LinkHandling/LinkService.php @@ -126,13 +126,13 @@ class LinkService implements SingletonInterface if ($fragment) { $result['fragment'] = $fragment; } - } elseif ($this->handlers[self::TYPE_URL] && PathUtility::hasProtocolAndScheme($urn)) { + } elseif (($this->handlers[self::TYPE_URL] ?? false) && PathUtility::hasProtocolAndScheme($urn)) { $result = $this->handlers[self::TYPE_URL]->resolveHandlerData(['url' => $urn]); $result['type'] = self::TYPE_URL; } elseif (($this->handlers[self::TYPE_EMAIL] ?? false) && str_starts_with(strtolower($urn), 'mailto:')) { $result = $this->handlers[self::TYPE_EMAIL]->resolveHandlerData(['email' => $urn]); $result['type'] = self::TYPE_EMAIL; - } elseif (($this->handlers[self::TYPE_TELEPHONE] ?? false) && str_starts_with(strtolower($urn), 'tel:')) { + } elseif (($this->handlers[self::TYPE_TELEPHONE] ?? false) && str_starts_with(strtolower($urn), 'tel:')) { $result = $this->handlers[self::TYPE_TELEPHONE]->resolveHandlerData(['telephone' => $urn]); $result['type'] = self::TYPE_TELEPHONE; } else { diff --git a/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php b/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php index 0874dd924f97d217c2c133598634fd3e5e686d0f..012a22021a890e198aa9db117b2b863b9aae940a 100644 --- a/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php +++ b/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php @@ -795,7 +795,7 @@ abstract class AbstractMenuContentObject $pageRecords = $this->sys_page->getMenuForPages($pageIds, '*', $sortingField ?: $sortField . ' DESC', $extraWhere); foreach ($pageRecords as $row) { // Build a custom LIMIT clause as "getMenuForPages()" does not support this - if ($limit && ++$i > $limit) { + if (++$i > $limit) { continue; } $menuItems[$row['uid']] = $row;