Passed
Pull Request — master (#97)
by Kiran
05:19
created
includes/wpinv-template-functions.php 1 patch
Braces   +21 added lines, -15 removed lines patch added patch discarded remove patch
@@ -173,8 +173,9 @@  discard block
 block discarded – undo
173 173
 
174 174
 	// Setup possible parts
175 175
 	$templates = array();
176
-	if ( isset( $name ) )
177
-		$templates[] = $slug . '-' . $name . '.php';
176
+	if ( isset( $name ) ) {
177
+			$templates[] = $slug . '-' . $name . '.php';
178
+	}
178 179
 	$templates[] = $slug . '.php';
179 180
 
180 181
 	// Allow template parts to be filtered
@@ -192,8 +193,9 @@  discard block
 block discarded – undo
192 193
 	foreach ( (array)$template_names as $template_name ) {
193 194
 
194 195
 		// Continue if template is empty
195
-		if ( empty( $template_name ) )
196
-			continue;
196
+		if ( empty( $template_name ) ) {
197
+					continue;
198
+		}
197 199
 
198 200
 		// Trim off any slashes from the template name
199 201
 		$template_name = ltrim( $template_name, '/' );
@@ -212,8 +214,9 @@  discard block
 block discarded – undo
212 214
 		}
213 215
 	}
214 216
 
215
-	if ( ( true == $load ) && ! empty( $located ) )
216
-		load_template( $located, $require_once );
217
+	if ( ( true == $load ) && ! empty( $located ) ) {
218
+			load_template( $located, $require_once );
219
+	}
217 220
 
218 221
 	return $located;
219 222
 }
@@ -289,8 +292,9 @@  discard block
 block discarded – undo
289 292
 function wpinv_html_dropdown( $name = 'wpinv_discounts', $selected = 0, $status = '' ) {
290 293
     $args = array( 'nopaging' => true );
291 294
 
292
-    if ( ! empty( $status ) )
293
-        $args['post_status'] = $status;
295
+    if ( ! empty( $status ) ) {
296
+            $args['post_status'] = $status;
297
+    }
294 298
 
295 299
     $discounts = wpinv_get_discounts( $args );
296 300
     $options   = array();
@@ -1457,17 +1461,19 @@  discard block
 block discarded – undo
1457 1461
 add_action( 'wpinv_cart_empty', 'wpinv_empty_checkout_cart' );
1458 1462
 
1459 1463
 function wpinv_save_cart_button() {
1460
-    if ( wpinv_is_cart_saving_disabled() )
1461
-        return;
1462
-?>
1464
+    if ( wpinv_is_cart_saving_disabled() ) {
1465
+            return;
1466
+    }
1467
+    ?>
1463 1468
     <a class="wpinv-cart-saving-button wpinv-submit button" id="wpinv-save-cart-button" href="<?php echo esc_url( add_query_arg( 'wpi_action', 'save_cart' ) ); ?>"><?php _e( 'Save Cart', 'invoicing' ); ?></a>
1464 1469
 <?php
1465 1470
 }
1466 1471
 
1467 1472
 function wpinv_update_cart_button() {
1468
-    if ( !wpinv_item_quantities_enabled() )
1469
-        return;
1470
-?>
1473
+    if ( !wpinv_item_quantities_enabled() ) {
1474
+            return;
1475
+    }
1476
+    ?>
1471 1477
     <input type="submit" name="wpinv_update_cart_submit" class="wpinv-submit wpinv-no-js button" value="<?php _e( 'Update Cart', 'invoicing' ); ?>"/>
1472 1478
     <input type="hidden" name="wpi_action" value="update_cart"/>
1473 1479
 <?php
@@ -1606,7 +1612,7 @@  discard block
 block discarded – undo
1606 1612
 		                    </div>
1607 1613
 		                    <?php
1608 1614
 	                    }
1609
-                    }else{
1615
+                    } else{
1610 1616
 	                    echo '<div class="alert alert-warning">'. __('No payment gateway active','invoicing') .'</div>';
1611 1617
                     }
1612 1618
 
Please login to merge, or discard this patch.