Completed
Push — master ( 3f4f2c...4ae216 )
by Askupa
14:30
created
functions.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,9 @@
 block discarded – undo
17 17
 /**
18 18
  * Prevent loading the library more than once
19 19
  */
20
-if( defined( 'AMARKAL_UI' ) ) return false;
20
+if( defined( 'AMARKAL_UI' ) ) {
21
+    return false;
22
+}
21 23
 define( 'AMARKAL_UI', true );
22 24
 
23 25
 if(!function_exists('amarkal_ui_render'))
Please login to merge, or discard this patch.
ComponentFactory.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,8 +46,9 @@  discard block
 block discarded – undo
46 46
         if( !in_array($type, self::$registered_components) )
47 47
         {
48 48
             self::$registered_components[$type] = $class_name;
49
+        } else {
50
+            throw new \RuntimeException("A component of type '$type' has already been registered.");
49 51
         }
50
-        else throw new \RuntimeException("A component of type '$type' has already been registered.");
51 52
     }
52 53
     
53 54
     /**
@@ -67,8 +68,7 @@  discard block
 block discarded – undo
67 68
             if( file_exists( $file_name ) ) 
68 69
             {
69 70
                 require_once $file_name;
70
-            }
71
-            else 
71
+            } else 
72 72
             {
73 73
                 throw new \RuntimeException("A component of type '$type' does not exist.");
74 74
             }
Please login to merge, or discard this patch.
Form.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,9 @@
 block discarded – undo
202 202
      */
203 203
     private function validate( $component )
204 204
     {
205
-        if( !($component instanceof ValidatableComponentInterface) ) return;
205
+        if( !($component instanceof ValidatableComponentInterface) ) {
206
+            return;
207
+        }
206 208
         
207 209
         $name     = $component->name;
208 210
         $validate = $component->validation;
Please login to merge, or discard this patch.
Template.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.
components/checkbox/controller.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 class Component_checkbox
9 9
 extends AbstractComponent
10 10
 implements ValueComponentInterface, 
11
-           DisableableComponentInterface
11
+            DisableableComponentInterface
12 12
 {
13 13
     public $name_template = '{{name}}[]';
14 14
     
Please login to merge, or discard this patch.
components/composite/controller.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
 class Component_composite
9 9
 extends AbstractComponent
10 10
 implements ValueComponentInterface, 
11
-           DisableableComponentInterface,
12
-           FilterableComponentInterface,
13
-           ValidatableComponentInterface
11
+            DisableableComponentInterface,
12
+            FilterableComponentInterface,
13
+            ValidatableComponentInterface
14 14
 {
15 15
     /**
16 16
      * The list of child components.
Please login to merge, or discard this patch.
components/select/controller.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 class Component_select
9 9
 extends AbstractComponent
10 10
 implements ValueComponentInterface, 
11
-           DisableableComponentInterface
11
+            DisableableComponentInterface
12 12
 {
13 13
     public $component_type = 'select';
14 14
     
Please login to merge, or discard this patch.
components/textarea/controller.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
 class Component_textarea
9 9
 extends AbstractComponent
10 10
 implements ValueComponentInterface, 
11
-           DisableableComponentInterface,
12
-           FilterableComponentInterface,
13
-           ValidatableComponentInterface
11
+            DisableableComponentInterface,
12
+            FilterableComponentInterface,
13
+            ValidatableComponentInterface
14 14
 {
15 15
     public $component_type = 'textarea';
16 16
     
Please login to merge, or discard this patch.
components/number/controller.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
 class Component_number
9 9
 extends AbstractComponent
10 10
 implements ValueComponentInterface, 
11
-           DisableableComponentInterface,
12
-           FilterableComponentInterface,
13
-           ValidatableComponentInterface
11
+            DisableableComponentInterface,
12
+            FilterableComponentInterface,
13
+            ValidatableComponentInterface
14 14
 {
15 15
     public $component_type = 'number';
16 16
     
Please login to merge, or discard this patch.