From 2c2005f544f21198d7e14d5b6083b1dbec8406e7 Mon Sep 17 00:00:00 2001
From: Torben Hansen <derhansen@gmail.com>
Date: Sun, 16 Jun 2024 19:48:21 +0200
Subject: [PATCH] [TASK] Remove unnecessary typecasts in ext:fluid
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This change removes redundant typecasts in ext:fluid, where
the variable type already matches the type being cast.

Resolves: #104122
Releases: main
Change-Id: I9ff2f0eaeae1f931179dcfe85c99d877e67dd132
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84728
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Jasmina Ließmann <minapokhalo+typo3@gmail.com>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: Jasmina Ließmann <minapokhalo+typo3@gmail.com>
---
 typo3/sysext/fluid/Classes/View/TemplatePaths.php         | 2 +-
 typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/typo3/sysext/fluid/Classes/View/TemplatePaths.php b/typo3/sysext/fluid/Classes/View/TemplatePaths.php
index dc84d1a28050..5d0a80b8de58 100644
--- a/typo3/sysext/fluid/Classes/View/TemplatePaths.php
+++ b/typo3/sysext/fluid/Classes/View/TemplatePaths.php
@@ -81,7 +81,7 @@ class TemplatePaths extends \TYPO3Fluid\Fluid\View\TemplatePaths
                 self::CONFIG_LAYOUTROOTPATHS => $this->layoutRootPaths,
             ];
         } else {
-            $typoScript = (array)$this->getConfigurationManager()->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
+            $typoScript = $this->getConfigurationManager()->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
             $signature = str_replace('_', '', $extensionKey);
             if ($this->isBackendMode() && isset($typoScript['module.']['tx_' . $signature . '.']['view.'])) {
                 $configuredPaths = (array)$typoScript['module.']['tx_' . $signature . '.']['view.'];
diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php
index 10bd87148a87..ab05b8110357 100644
--- a/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php
+++ b/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php
@@ -283,9 +283,9 @@ class FormViewHelper extends AbstractFormViewHelper
         ];
 
         $result = LF;
-        $result .= '<input type="hidden" name="' . htmlspecialchars($this->prefixFieldName('__referrer[@extension]')) . '" value="' . htmlspecialchars((string)$extensionName) . '" />' . LF;
-        $result .= '<input type="hidden" name="' . htmlspecialchars($this->prefixFieldName('__referrer[@controller]')) . '" value="' . htmlspecialchars((string)$controllerName) . '" />' . LF;
-        $result .= '<input type="hidden" name="' . htmlspecialchars($this->prefixFieldName('__referrer[@action]')) . '" value="' . htmlspecialchars((string)$actionName) . '" />' . LF;
+        $result .= '<input type="hidden" name="' . htmlspecialchars($this->prefixFieldName('__referrer[@extension]')) . '" value="' . htmlspecialchars($extensionName) . '" />' . LF;
+        $result .= '<input type="hidden" name="' . htmlspecialchars($this->prefixFieldName('__referrer[@controller]')) . '" value="' . htmlspecialchars($controllerName) . '" />' . LF;
+        $result .= '<input type="hidden" name="' . htmlspecialchars($this->prefixFieldName('__referrer[@action]')) . '" value="' . htmlspecialchars($actionName) . '" />' . LF;
         $result .= '<input type="hidden" name="' . htmlspecialchars($this->prefixFieldName('__referrer[arguments]')) . '" value="' . htmlspecialchars($this->hashService->appendHmac(base64_encode(serialize($request->getArguments())), HashScope::ReferringArguments->prefix())) . '" />' . LF;
         $result .= '<input type="hidden" name="' . htmlspecialchars($this->prefixFieldName('__referrer[@request]')) . '" value="' . htmlspecialchars($this->hashService->appendHmac(json_encode($actionRequest), HashScope::ReferringRequest->prefix())) . '" />' . LF;
 
-- 
GitLab