Completed
Push — master ( 41953e...e33ed1 )
by Askupa
01:47
created
functions.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,9 @@
 block discarded – undo
18 18
 /**
19 19
  * Prevent loading the library more than once
20 20
  */
21
-if( defined( 'AMARKAL_METABOX' ) ) return false;
21
+if( defined( 'AMARKAL_METABOX' ) ) {
22
+    return false;
23
+}
22 24
 define( 'AMARKAL_METABOX', true );
23 25
 
24 26
 if(!function_exists('amarkal_add_meta_box'))
Please login to merge, or discard this patch.
Manager.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,8 +49,9 @@
 block discarded – undo
49 49
         if( !in_array($id, $this->metaboxes) )
50 50
         {
51 51
             $this->metaboxes[$id] = array_merge($this->default_args(), $args);
52
+        } else {
53
+            throw new \RuntimeException("A metabox with id '$id' has already been registered.");
52 54
         }
53
-        else throw new \RuntimeException("A metabox with id '$id' has already been registered.");
54 55
     }
55 56
     
56 57
     /**
Please login to merge, or discard this patch.