Completed
Pull Request — master (#6)
by De Cramer
11:31
created
src/eXpansion/Core/Services/PluginManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             // If parent product isn't compatible then this plugin needs disabling.
76 76
             // if not check all children plugins to see which ones needs enabling.
77 77
             if ($isCompatible && $this->isPluginCompatible($plugin, $title, $mode, $script)) {
78
-                $this->enablePlugin($plugin,  $title, $mode, $script);
78
+                $this->enablePlugin($plugin, $title, $mode, $script);
79 79
 
80 80
                 if (!empty($plugin->getChildrens())) {
81 81
                     $this->enableDisablePlugins($plugin->getChildrens(), $title, $mode, $script, true);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         }
129 129
 
130 130
         foreach ($plugin->getDataProviders() as $provider) {
131
-            $this->dataProviderManager->registerPlugin($provider, $plugin->getPluginId(),  $title, $mode, $script);
131
+            $this->dataProviderManager->registerPlugin($provider, $plugin->getPluginId(), $title, $mode, $script);
132 132
         }
133 133
     }
134 134
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      * @param PluginDescription $plugin
139 139
      *
140 140
      */
141
-    protected function disablePlugin(PluginDescription $plugin){
141
+    protected function disablePlugin(PluginDescription $plugin) {
142 142
         $plugin->setIsEnabled(false);
143 143
 
144 144
         foreach ($plugin->getDataProviders() as $provider) {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         // Inverse order so that we have get childrends from the plugins.
155 155
         $toRemove = [];
156 156
         foreach ($this->plugins as $plugin) {
157
-            if(!empty($plugin->getParents())) {
157
+            if (!empty($plugin->getParents())) {
158 158
                 foreach ($plugin->getParents() as $parentId) {
159 159
                     if ($this->plugins[$parentId]) {
160 160
                         $this->plugins[$parentId]->addChildren($plugin);
Please login to merge, or discard this patch.