From 82eea73a14bba60536400c2e6108a12b2482e3f3 Mon Sep 17 00:00:00 2001
From: Torben Hansen <derhansen@gmail.com>
Date: Sun, 19 May 2024 13:42:44 +0200
Subject: [PATCH] [TASK] Remove superfluous typecast in TSFE
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This change removes a superfluous typecast in
`TypoScriptFrontendController`.

Additionally, the function's doc comment has been revised
and the `@param` comment has been removed, since the
function parameter is self-explaining.

Resolves: #103859
Releases: main
Change-Id: I66bdfbbaf0854bff25a801849b253a607cc122b6
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84313
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Chris Müller <typo3@brotkrueml.dev>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Tested-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Chris Müller <typo3@brotkrueml.dev>
---
 .../Classes/Controller/TypoScriptFrontendController.php      | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
index d17d61d7b6d8..ed34ecf633dc 100644
--- a/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
+++ b/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
@@ -954,14 +954,11 @@ class TypoScriptFrontendController implements LoggerAwareInterface
     }
 
     /**
-     * Sets the cache-timeout in seconds
-     *
-     * @param int $seconds Cache-timeout in seconds
+     * Sets the default page cache timeout in seconds
      * @internal
      */
     public function set_cache_timeout_default(int $seconds): void
     {
-        $seconds = (int)$seconds;
         if ($seconds > 0) {
             $this->cacheTimeOutDefault = $seconds;
         }
-- 
GitLab