Code Duplication    Length = 18-18 lines in 2 locations

src/Preference/Listener/ConfigureSystem.php 2 locations

@@ 62-79 (lines=18) @@
59
    public function handle()
60
    {
61
        /* @var Addon $addon */
62
        foreach ($this->addons->withConfig('preferences') as $addon) {
63
            foreach ($this->config->get($addon->getNamespace('preferences')) as $key => $setting) {
64
65
                if (isset($setting['env']) && env($setting['env']) !== null) {
66
                    continue;
67
                }
68
69
                if (!isset($setting['bind'])) {
70
                    continue;
71
                }
72
73
                if (!$this->preferences->has($key = $addon->getNamespace($key))) {
74
                    continue;
75
                }
76
77
                $this->config->set($setting['bind'], $this->preferences->value($key));
78
            }
79
        }
80
81
        foreach ($this->addons->withConfig('preferences/preferences') as $addon) {
82
            foreach ($this->config->get($addon->getNamespace('preferences/preferences')) as $key => $setting) {
@@ 81-98 (lines=18) @@
78
            }
79
        }
80
81
        foreach ($this->addons->withConfig('preferences/preferences') as $addon) {
82
            foreach ($this->config->get($addon->getNamespace('preferences/preferences')) as $key => $setting) {
83
84
                if (isset($setting['env']) && env($setting['env']) !== null) {
85
                    continue;
86
                }
87
88
                if (!isset($setting['bind'])) {
89
                    continue;
90
                }
91
92
                if (!$this->preferences->has($key = $addon->getNamespace($key))) {
93
                    continue;
94
                }
95
96
                $this->config->set($setting['bind'], $this->preferences->value($key));
97
            }
98
        }
99
100
        foreach ($this->config->get('streams::preferences/preferences') as $key => $setting) {
101