Code Duplication    Length = 12-12 lines in 2 locations

htdocs/xoops_lib/Xoops/Core/Service/Manager.php 1 location

@@ 162-173 (lines=12) @@
159
     *
160
     * @return void
161
     */
162
    protected function saveProviderPrefs($providerPrefs)
163
    {
164
        if (is_array($providerPrefs)) {
165
            $xoops = \Xoops::getInstance();
166
            try {
167
                Yaml::save($providerPrefs, $xoops->path($this->providerPrefsFilename));
168
                $xoops->cache()->write($this->providerPrefsCacheKey, $providerPrefs);
169
            } catch (\Exception $e) {
170
                $xoops->events()->triggerEvent('core.exception', $e);
171
            }
172
        }
173
    }
174
175
    /**
176
     * saveChoice - record priority choices for service providers

htdocs/xoops_lib/Xoops/Core/Assets.php 1 location

@@ 182-193 (lines=12) @@
179
     *
180
     * @return void
181
     */
182
    protected function saveAssetsPrefs($assets_prefs)
183
    {
184
        if (is_array($assets_prefs)) {
185
            $xoops = \Xoops::getInstance();
186
            try {
187
                Yaml::save($assets_prefs, $xoops->path($this->assetsPrefsFilename));
188
                $xoops->cache()->write($this->assetsPrefsCacheKey, $assets_prefs);
189
            } catch (\Exception $e) {
190
                $xoops->events()->triggerEvent('core.exception', $e);
191
            }
192
        }
193
    }
194
195
196
    /**