Code Duplication    Length = 3-7 lines in 2 locations

src/eXpansion/Framework/Core/Services/PluginManager.php 2 locations

@@ 212-214 (lines=3) @@
209
        $plugin->setIsEnabled(true);
210
        $pluginService = $this->container->get($plugin->getPluginId());
211
212
        if ($pluginService instanceof StatusAwarePluginInterface && !isset($this->enabledPlugins[$plugin->getPluginId()])) {
213
            $notify = true;
214
        }
215
216
        $this->console->getConsoleOutput()
217
            ->writeln("<info>Plugin <comment>'{$plugin->getPluginId()}'</comment> is enabled with providers :</info>");
@@ 244-250 (lines=7) @@
241
            $this->dataProviderManager->deletePlugin($provider, $plugin->getPluginId());
242
        }
243
244
        if (isset($this->enabledPlugins[$plugin->getPluginId()])) {
245
            unset($this->enabledPlugins[$plugin->getPluginId()]);
246
247
            if ($pluginService instanceof StatusAwarePluginInterface) {
248
                $notify = true;
249
            }
250
        }
251
252
        return $notify ? $pluginService : null;
253
    }