Passed
Push — master ( d3a849...092323 )
by Glegrith
02:40 queued 12s
created
app/framework/Component/Database/Commands/MakeModelCommand.php 1 patch
Braces   +10 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,15 +51,17 @@
 block discarded – undo
51 51
 
52 52
         $template = str_replace("§NAME§", $migrationName, $this->template);
53 53
 
54
-        if(isset($connectionName))
55
-            $template = str_replace("§CONNECTION§", 'protected $connection = "'.$connectionName.'";', $template);
56
-        else
57
-            $template = str_replace("§CONNECTION§", '', $template);
54
+        if(isset($connectionName)) {
55
+                    $template = str_replace("§CONNECTION§", 'protected $connection = "'.$connectionName.'";', $template);
56
+        } else {
57
+                    $template = str_replace("§CONNECTION§", '', $template);
58
+        }
58 59
 
59
-        if(isset($tableName))
60
-            $template = str_replace("§TABLE§", 'protected $table = "'.$tableName.'";', $template);
61
-        else
62
-            $template = str_replace("§TABLE§", '', $template);
60
+        if(isset($tableName)) {
61
+                    $template = str_replace("§TABLE§", 'protected $table = "'.$tableName.'";', $template);
62
+        } else {
63
+                    $template = str_replace("§TABLE§", '', $template);
64
+        }
63 65
 
64 66
         $File = new File($migrationName.".php", new Storage("model"), true);
65 67
         //$File->setContents($template);
Please login to merge, or discard this patch.
app/framework/Component/App/App.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@  discard block
 block discarded – undo
31 31
 
32 32
         $this->registerNewClass($classMethod, $method);
33 33
         try {
34
-            if($method == null)
35
-                throw new Exception("You have to specify an method to call");
34
+            if($method == null) {
35
+                            throw new Exception("You have to specify an method to call");
36
+            }
36 37
         } catch (Exception $e) {
37 38
             handle($e);
38 39
         } finally {
@@ -64,8 +65,9 @@  discard block
 block discarded – undo
64 65
         $class = self::validateClass(explode("@", $class)[0]);
65 66
 
66 67
         try {
67
-            if(! is_object($t_class = new $class))
68
-                throw new Exception("Could not instantiate class");
68
+            if(! is_object($t_class = new $class)) {
69
+                            throw new Exception("Could not instantiate class");
70
+            }
69 71
         } catch (Exception $e) {
70 72
             handle($e);
71 73
         } finally {
Please login to merge, or discard this patch.