Code Duplication    Length = 18-18 lines in 2 locations

src/Setting/Command/ConfigureSystem.php 2 locations

@@ 48-65 (lines=18) @@
45
        Repository $config
46
    ) {
47
        /* @var Addon $addon */
48
        foreach ($addons->withConfig('settings') as $addon) {
49
            foreach ($config->get($addon->getNamespace('settings')) as $key => $setting) {
50
51
                if (isset($setting['env']) && env($setting['env']) !== null) {
52
                    continue;
53
                }
54
55
                if (!isset($setting['replace'])) {
56
                    continue;
57
                }
58
59
                if (!$settings->has($key = $addon->getNamespace($key))) {
60
                    continue;
61
                }
62
63
                $config->set($setting['replace'], $settings->value($key));
64
            }
65
        }
66
67
        foreach ($addons->withConfig('settings/settings') as $addon) {
68
            foreach ($config->get($addon->getNamespace('settings/settings')) as $key => $setting) {
@@ 67-84 (lines=18) @@
64
            }
65
        }
66
67
        foreach ($addons->withConfig('settings/settings') as $addon) {
68
            foreach ($config->get($addon->getNamespace('settings/settings')) as $key => $setting) {
69
70
                if (isset($setting['env']) && env($setting['env']) !== null) {
71
                    continue;
72
                }
73
74
                if (!isset($setting['replace'])) {
75
                    continue;
76
                }
77
78
                if (!$settings->has($key = $addon->getNamespace($key))) {
79
                    continue;
80
                }
81
82
                $config->set($setting['replace'], $settings->value($key));
83
            }
84
        }
85
86
        foreach ($config->get('streams::settings/settings') as $key => $setting) {
87