Code Duplication    Length = 10-10 lines in 2 locations

typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php 1 location

@@ 4186-4195 (lines=10) @@
4183
     * @param mixed $data given by reference (string/array usually)
4184
     * @param string $fromCharset convert FROM this charset
4185
     */
4186
    protected function convertCharsetRecursivelyToUtf8(&$data, string $fromCharset)
4187
    {
4188
        foreach ($data as $key => $value) {
4189
            if (is_array($data[$key])) {
4190
                $this->convertCharsetRecursivelyToUtf8($data[$key], $fromCharset);
4191
            } elseif (is_string($data[$key])) {
4192
                $data[$key] = mb_convert_encoding($data[$key], 'utf-8', $fromCharset);
4193
            }
4194
        }
4195
    }
4196
4197
    /**
4198
     * Calculates page cache timeout according to the records with starttime/endtime on the page.

typo3/sysext/core/Classes/Page/PageRenderer.php 1 location

@@ 1929-1938 (lines=10) @@
1926
     * @param mixed $data given by reference (string/array usually)
1927
     * @param string $fromCharset convert FROM this charset
1928
     */
1929
    protected function convertCharsetRecursivelyToUtf8(&$data, string $fromCharset)
1930
    {
1931
        foreach ($data as $key => $value) {
1932
            if (is_array($data[$key])) {
1933
                $this->convertCharsetRecursivelyToUtf8($data[$key], $fromCharset);
1934
            } elseif (is_string($data[$key])) {
1935
                $data[$key] = mb_convert_encoding($data[$key], 'utf-8', $fromCharset);
1936
            }
1937
        }
1938
    }
1939
1940
    /**
1941
     * Make URLs to all backend ajax handlers available as inline setting.