Code Duplication    Length = 5-9 lines in 2 locations

typo3/sysext/extensionmanager/Classes/Utility/ConfigurationUtility.php 1 location

@@ 324-328 (lines=5) @@
321
        $flatSetup = [];
322
        if (is_array($setupArray)) {
323
            foreach ($setupArray as $key => $val) {
324
                if (is_array($val)) {
325
                    $flatSetup = array_merge($flatSetup, $this->flattenSetup($val, $prefix . $key));
326
                } else {
327
                    $flatSetup[$prefix . $key] = $val;
328
                }
329
            }
330
        }
331
        return $flatSetup;

typo3/sysext/core/Classes/TypoScript/TemplateService.php 1 location

@@ 1268-1276 (lines=9) @@
1265
     */
1266
    public function flattenSetup($setupArray, $prefix)
1267
    {
1268
        if (is_array($setupArray)) {
1269
            foreach ($setupArray as $key => $val) {
1270
                if (is_array($val)) {
1271
                    $this->flattenSetup($val, $prefix . $key);
1272
                } else {
1273
                    $this->flatSetup[$prefix . $key] = $val;
1274
                }
1275
            }
1276
        }
1277
    }
1278
1279
    /**