Code Duplication    Length = 7-9 lines in 3 locations

typo3/sysext/frontend/Classes/Hooks/MediaItemHooks.php 2 locations

@@ 30-36 (lines=7) @@
27
     * @param array $params Existing types by reference
28
     * @param array $conf Config array
29
     */
30
    public function customMediaRenderTypes(&$params, $conf)
31
    {
32
        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/hooks/class.tx_cms_mediaitems.php']['customMediaRenderTypes'] ?? [] as $className) {
33
            $hookObj = GeneralUtility::makeInstance($className);
34
            $hookObj->customMediaRenderTypes($params, $conf);
35
        }
36
    }
37
38
    /**
39
     * Load extra predefined media params if they exist
@@ 44-50 (lines=7) @@
41
     * @param array $params Existing types by reference
42
     * @param array $conf Config array
43
     */
44
    public function customMediaParams(&$params, $conf)
45
    {
46
        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/hooks/class.tx_cms_mediaitems.php']['customMediaParams'] ?? [] as $className) {
47
            $hookObj = GeneralUtility::makeInstance($className);
48
            $hookObj->customMediaParams($params, $conf);
49
        }
50
    }
51
}
52

typo3/sysext/setup/Classes/Controller/SetupModuleController.php 1 location

@@ 362-370 (lines=9) @@
359
     *
360
     * @return string
361
     */
362
    protected function getJavaScript()
363
    {
364
        $javaScript = '';
365
        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/setup/mod/index.php']['setupScriptHook'] ?? [] as $function) {
366
            $params = [];
367
            $javaScript .= GeneralUtility::callUserFunction($function, $params, $this);
368
        }
369
        return $javaScript;
370
    }
371
372
    /**
373
     * Generate the main settings form: