Completed
Push — master ( cf161c...bee2ac )
by Federico
02:31
created
dist/jate/modules/Module/Module.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,26 +17,26 @@
 block discarded – undo
17 17
       $this->__queryConstruct();
18 18
       $this->__fileConstruct();
19 19
     }
20
-    public function addModules( $_modules ) {
21
-      if(!is_array($_modules))
20
+    public function addModules($_modules) {
21
+      if (!is_array($_modules))
22 22
         throw new JException("Parameter must be an array.");
23 23
       foreach ($_modules as $value)
24 24
         $this->addModule($value);
25 25
     }
26
-    public function addModule( $_module ) {
27
-      if(!is_object($_module))
26
+    public function addModule($_module) {
27
+      if (!is_object($_module))
28 28
         throw new JException("Parameter must be a object.");
29
-      if(! is_subclass_of ($_module, "Module"))
29
+      if (!is_subclass_of($_module, "Module"))
30 30
         throw new JException("Parameter must be a object inherited from Module object.");
31 31
       $this->modules[$_module->name] = $_module;
32
-      if($this->currentConnection)
32
+      if ($this->currentConnection)
33 33
         $this->modules[$_module->name]->addConnectionMan($this->currentConnection);
34 34
     }
35
-    public function addConnectionMan( $_connection, $_name = "default") {
35
+    public function addConnectionMan($_connection, $_name = "default") {
36 36
       try {
37 37
         $this->__addConnectionMan($_connection, $_name);
38 38
         foreach ($this->modules as &$module)
39
-          if(isset($this->currentConnection))
39
+          if (isset($this->currentConnection))
40 40
             $module->addConnectionMan($this->currentConnection, $_name);
41 41
       } catch (Exception $e) {
42 42
         throw new JException($e->getMessage(), 1);
Please login to merge, or discard this patch.
Braces   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -18,26 +18,32 @@
 block discarded – undo
18 18
       $this->__fileConstruct();
19 19
     }
20 20
     public function addModules( $_modules ) {
21
-      if(!is_array($_modules))
22
-        throw new JException("Parameter must be an array.");
23
-      foreach ($_modules as $value)
24
-        $this->addModule($value);
21
+      if(!is_array($_modules)) {
22
+              throw new JException("Parameter must be an array.");
23
+      }
24
+      foreach ($_modules as $value) {
25
+              $this->addModule($value);
26
+      }
25 27
     }
26 28
     public function addModule( $_module ) {
27
-      if(!is_object($_module))
28
-        throw new JException("Parameter must be a object.");
29
-      if(! is_subclass_of ($_module, "Module"))
30
-        throw new JException("Parameter must be a object inherited from Module object.");
29
+      if(!is_object($_module)) {
30
+              throw new JException("Parameter must be a object.");
31
+      }
32
+      if(! is_subclass_of ($_module, "Module")) {
33
+              throw new JException("Parameter must be a object inherited from Module object.");
34
+      }
31 35
       $this->modules[$_module->name] = $_module;
32
-      if($this->currentConnection)
33
-        $this->modules[$_module->name]->addConnectionMan($this->currentConnection);
36
+      if($this->currentConnection) {
37
+              $this->modules[$_module->name]->addConnectionMan($this->currentConnection);
38
+      }
34 39
     }
35 40
     public function addConnectionMan( $_connection, $_name = "default") {
36 41
       try {
37 42
         $this->__addConnectionMan($_connection, $_name);
38
-        foreach ($this->modules as &$module)
39
-          if(isset($this->currentConnection))
43
+        foreach ($this->modules as &$module) {
44
+                  if(isset($this->currentConnection))
40 45
             $module->addConnectionMan($this->currentConnection, $_name);
46
+        }
41 47
       } catch (Exception $e) {
42 48
         throw new JException($e->getMessage(), 1);
43 49
       }
Please login to merge, or discard this patch.