Code Duplication    Length = 21-21 lines in 2 locations

AdminModule/presenters/SettingsPresenter.php 2 locations

@@ 449-469 (lines=21) @@
446
447
    /* SCRIPTS SETTINGS */
448
449
    public function renderScriptsSettings()
450
    {
451
        $this->reloadContent();
452
453
        $globalScriptsVars = array('pageScriptsHead', 'pageScriptsBodyStart', 'pageScriptsBodyEnd');
454
        $hooks = array();
455
456
        foreach (Finder::findFiles('@*.latte')->in(APP_DIR . '/templates') as $key => $file) {
457
            $filename = $file->getFileName();
458
459
            foreach ($globalScriptsVars as $key => $var) {
460
                if (\WebCMS\Helpers\SystemHelper::checkFileContainsStr(APP_DIR . '/templates/' . $filename, $var)) {
461
                    $hooks[$filename][$var] = true;
462
                } else {
463
                    $hooks[$filename][$var] = false;
464
                }
465
            }
466
        }
467
468
        $this->template->scriptsHooks = $hooks;
469
    }
470
471
    public function createComponentScriptsGlobalForm()
472
    {
@@ 487-507 (lines=21) @@
484
485
    /* STYLES SETTINGS */
486
487
    public function renderStylesSettings()
488
    {
489
        $this->reloadContent();
490
491
        $globalStylesVars = array('pageStylesHead');
492
        $hooks = array();
493
494
        foreach (Finder::findFiles('@*.latte')->in(APP_DIR . '/templates') as $key => $file) {
495
            $filename = $file->getFileName();
496
497
            foreach ($globalStylesVars as $key => $var) {
498
                if (\WebCMS\Helpers\SystemHelper::checkFileContainsStr(APP_DIR . '/templates/' . $filename, $var)) {
499
                    $hooks[$filename][$var] = true;
500
                } else {
501
                    $hooks[$filename][$var] = false;
502
                }
503
            }
504
        }
505
506
        $this->template->stylesHooks = $hooks;
507
    }
508
509
    public function createComponentStylesGlobalForm()
510
    {