update api documentation
This commit is contained in:
@@ -24,8 +24,8 @@ namespace Thelia\Core\HttpFoundation;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request as BaseRequest;
|
||||
|
||||
|
||||
class Request extends BaseRequest{
|
||||
class Request extends BaseRequest
|
||||
{
|
||||
|
||||
public function getProductId()
|
||||
{
|
||||
@@ -45,7 +45,8 @@ class Request extends BaseRequest{
|
||||
if ('' == $this->getQueryString()) {
|
||||
$additionalQs = '?'. ltrim($additionalQs, '&');
|
||||
}
|
||||
|
||||
return $uri . $additionalQs;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ class Session extends BaseSession
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param \Thelia\Model\Cart $cart
|
||||
* @param \Thelia\Model\Cart $cart
|
||||
* @throws \Thelia\Exception\InvalidCartException
|
||||
*/
|
||||
protected function verifyValidCart(Cart $cart)
|
||||
@@ -128,7 +128,7 @@ class Session extends BaseSession
|
||||
$customer = $this->getCustomerUser();
|
||||
if ($customer && $cart->getCustomerId() != $customer->getId()) {
|
||||
throw new InvalidCartException("customer in session and customer_id in cart are not the same");
|
||||
} else if($customer === null && $cart->getCustomerId() !== null) {
|
||||
} elseif ($customer === null && $cart->getCustomerId() !== null) {
|
||||
throw new InvalidCartException("Customer exists in cart and not in session");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user