Completed
Push — master ( d503c6...f36f04 )
by Askupa
02:05
created
bootstrap.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,9 @@
 block discarded – undo
16 16
 /**
17 17
  * Prevent loading the library more than once
18 18
  */
19
-if( defined( 'AMARKAL_TAXONOMY' ) ) return;
19
+if( defined( 'AMARKAL_TAXONOMY' ) ) {
20
+    return;
21
+}
20 22
 define( 'AMARKAL_TAXONOMY', true );
21 23
 
22 24
 /**
Please login to merge, or discard this patch.
Form.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,8 +63,9 @@
 block discarded – undo
63 63
         if( !isset($this->fields[$taxonomy_name][$field_name]))
64 64
         {
65 65
             $this->fields[$taxonomy_name][$field_name] = array_merge( $this->default_props(), $field_props );
66
+        } else {
67
+            throw new \RuntimeException("A field named '$field_name' has already been registered in '$taxonomy_name'");
66 68
         }
67
-        else throw new \RuntimeException("A field named '$field_name' has already been registered in '$taxonomy_name'");
68 69
     }
69 70
     
70 71
     /**
Please login to merge, or discard this patch.