Completed
Push — master ( d636cb...55701f )
by Askupa
01:54
created
bootstrap.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,9 @@
 block discarded – undo
15 15
 /**
16 16
  * Prevent loading the library more than once
17 17
  */
18
-if( defined( 'AMARKAL_UI' ) ) return;
18
+if( defined( 'AMARKAL_UI' ) ) {
19
+    return;
20
+}
19 21
 define( 'AMARKAL_UI', true );
20 22
 
21 23
 /**
Please login to merge, or discard this patch.
Renderer.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@  discard block
 block discarded – undo
47 47
         if( !in_array($type, $this->registered_components) )
48 48
         {
49 49
             $this->registered_components[$type] = $class_name;
50
+        } else {
51
+            throw new \RuntimeException("A component of type '$type' has already been registered.");
50 52
         }
51
-        else throw new \RuntimeException("A component of type '$type' has already been registered.");
52 53
     }
53 54
     
54 55
     /**
@@ -85,8 +86,7 @@  discard block
 block discarded – undo
85 86
             if( file_exists( $file_name ) ) 
86 87
             {
87 88
                 require_once $file_name;
88
-            }
89
-            else 
89
+            } else 
90 90
             {
91 91
                 throw new \RuntimeException("A component of type '$type' does not exist.");
92 92
             }
Please login to merge, or discard this patch.
AbstractController.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,8 +90,7 @@
 block discarded – undo
90 90
             ob_start();
91 91
             include( $this->get_template_path() );
92 92
             $rendered_html = ob_get_clean();
93
-        } 
94
-        else 
93
+        } else 
95 94
         {
96 95
             throw new \RuntimeException( "Error: cannot render HTML, template file not found at " . $this->get_template_path() );
97 96
         }
Please login to merge, or discard this patch.