Code Duplication    Length = 11-11 lines in 2 locations

AdminModule/presenters/CloningPresenter.php 1 location

@@ 37-47 (lines=11) @@
34
35
        $form->addGroup('Copy data from modules');
36
37
        foreach ($packages as $key => $package) {
38
            if ($package['vendor'] === 'webcms2' && $package['package'] !== 'webcms2') {
39
                $object = $this->createObject($package['package']);
40
41
                if ($object->isCloneable()) {
42
                    $form->addCheckbox(str_replace('-', '_', $package['package']), $package['package']);
43
                } else {
44
                    $form->addCheckbox(str_replace('-', '_', $package['package']), $package['package'].' not clonable.')->setDisabled(true);
45
                }
46
            }
47
        }
48
49
        $form->onSuccess[] = callback($this, 'cloningFormSubmitted');
50
        $form->addSubmit('send', 'Clone');

AdminModule/presenters/TranslatorPresenter.php 1 location

@@ 100-110 (lines=11) @@
97
98
            $form->addGroup('Settings');
99
100
            foreach ($packages as $key => $package) {
101
                if ($package['vendor'] === 'webcms2' && $package['package'] !== 'webcms2') {
102
                    $object = $this->createObject($package['package']);
103
104
                    if ($object->isTranslatable()) {
105
                        $form->addCheckbox(str_replace('-', '_', $package['package']), $package['package']);
106
                    } else {
107
                        $form->addCheckbox(str_replace('-', '_', $package['package']), $package['package'].' not translatable.')->setDisabled(true);
108
                    }
109
                }
110
            }
111
112
            $form->addSubmit('translate', 'Translate');
113
        }