Passed
Branch master (50908e)
by Stiofan
07:01
created
includes/wpinv-item-functions.php 1 patch
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 // Exit if accessed directly
3
-if ( ! defined( 'ABSPATH' ) ) exit;
3
+if ( ! defined( 'ABSPATH' ) ) {
4
+    exit;
5
+}
4 6
 
5 7
 function wpinv_get_item_by_id( $id ) {
6 8
     return wpinv_get_item_by( 'id', $id );
@@ -80,8 +82,9 @@  discard block
 block discarded – undo
80 82
 function wpinv_get_item( $item = 0 ) {
81 83
     if ( is_numeric( $item ) ) {
82 84
         $item = get_post( $item );
83
-        if ( ! $item || 'wpi_item' !== $item->post_type )
84
-            return null;
85
+        if ( ! $item || 'wpi_item' !== $item->post_type ) {
86
+                    return null;
87
+        }
85 88
         return $item;
86 89
     }
87 90
 
@@ -331,8 +334,9 @@  discard block
 block discarded – undo
331 334
 }
332 335
 
333 336
 function wpinv_remove_item_logs_on_delete( $item_id = 0 ) {
334
-    if ( 'wpi_item' !== get_post_type( $item_id ) )
335
-        return;
337
+    if ( 'wpi_item' !== get_post_type( $item_id ) ) {
338
+            return;
339
+    }
336 340
 
337 341
     global $wpinv_logs;
338 342
     
Please login to merge, or discard this patch.