Passed
Push — develop ( 7fd0a7...b40d4d )
by Mykola
04:17
created
application/controller/checkout/shipping_method.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,9 +109,11 @@
 block discarded – undo
109 109
 		}
110 110
 
111 111
 		// Validate cart has products and has stock.
112
-		if (!$this->cart->hasProducts()) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
112
+		if (!$this->cart->hasProducts()) {
113
+		    || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
113 114
 			$json['redirect'] = $this->url->link('checkout/cart');
114 115
 		}
116
+		}
115 117
 
116 118
 		// Validate minimum quantity requirements.
117 119
 		$products = $this->cart->getProducts();
Please login to merge, or discard this patch.
application/controller/checkout/checkout.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,9 +23,11 @@
 block discarded – undo
23 23
 class ControllerCheckoutCheckout extends \Sunrise\Engine\Core\Controller {
24 24
 	public function index() {
25 25
 		// Validate cart has products and has stock.
26
-		if (!$this->cart->hasProducts()) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
26
+		if (!$this->cart->hasProducts()) {
27
+		    || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
27 28
 			$this->response->redirect($this->url->link('checkout/cart'));
28 29
 		}
30
+		}
29 31
 
30 32
 		// Validate minimum quantity requirements.
31 33
 		$products = $this->cart->getProducts();
Please login to merge, or discard this patch.
application/controller/checkout/guest_shipping.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,9 +124,11 @@
 block discarded – undo
124 124
 		}
125 125
 
126 126
 		// Validate cart has products and has stock.
127
-		if (!$this->cart->hasProducts()) || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
127
+		if (!$this->cart->hasProducts()) {
128
+		    || (!$this->cart->hasStock() && !$this->config->get('config_stock_checkout'))) {
128 129
 			$json['redirect'] = $this->url->link('checkout/cart');
129 130
 		}
131
+		}
130 132
 
131 133
 		// Check if guest checkout is available.
132 134
 		if (!$this->config->get('config_checkout_guest') || $this->config->get('config_customer_price') || $this->cart->hasDownload()) {
Please login to merge, or discard this patch.