Completed
Push — master ( f1c245...fdc1e3 )
by Askupa
01:56
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 with a name of '$type' has already been registered.");
50 52
         }
51
-        else throw new \RuntimeException("A component with a name of '$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("The component '$type' does not exist.");
92 92
             }
Please login to merge, or discard this patch.
abstract-component.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,8 +76,7 @@
 block discarded – undo
76 76
             ob_start();
77 77
             include( $this->get_script_path() );
78 78
             $rendered_html = ob_get_clean();
79
-        } 
80
-        else 
79
+        } else 
81 80
         {
82 81
             throw new \RuntimeException( "Error: cannot render HTML, template file not found at " . $this->get_script_path() );
83 82
         }
Please login to merge, or discard this patch.