This commit is contained in:
Manuel Raynaud
2014-04-10 12:05:45 +02:00
parent caf22404f5
commit 2532a3bb4b
10 changed files with 61 additions and 69 deletions

View File

@@ -23,7 +23,6 @@
namespace Thelia\Action; namespace Thelia\Action;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;

View File

@@ -26,7 +26,6 @@ namespace Thelia\Core\Event\Cart;
use Thelia\Core\Event\ActionEvent; use Thelia\Core\Event\ActionEvent;
use Thelia\Model\CartItem; use Thelia\Model\CartItem;
/** /**
* Class CartItemDuplicationItem * Class CartItemDuplicationItem
* @package Thelia\Core\Event\Cart * @package Thelia\Core\Event\Cart
@@ -44,7 +43,7 @@ class CartItemDuplicationItem extends ActionEvent
*/ */
protected $newItem; protected $newItem;
function __construct(CartItem $newItem, CartItem $oldItem) public function __construct(CartItem $newItem, CartItem $oldItem)
{ {
$this->newItem = $newItem; $this->newItem = $newItem;
$this->oldItem = $oldItem; $this->oldItem = $oldItem;
@@ -66,5 +65,4 @@ class CartItemDuplicationItem extends ActionEvent
return $this->oldItem; return $this->oldItem;
} }
} }

View File

@@ -81,8 +81,6 @@ class OrderEvent extends ActionEvent
return $this->cartItemId; return $this->cartItemId;
} }
/** /**
* @param Order $order * @param Order $order
*/ */

View File

@@ -31,8 +31,6 @@ class OrderProduct extends BaseOrderProduct
return $this->cartIemId; return $this->cartIemId;
} }
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */

View File

@@ -303,7 +303,8 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
* @param Order $order an order * @param Order $order an order
* @return bool true if this module is the payment module for the given order. * @return bool true if this module is the payment module for the given order.
*/ */
public function isPaymentModuleFor(Order $order) { public function isPaymentModuleFor(Order $order)
{
$model = $this->getModuleModel(); $model = $this->getModuleModel();
return $order->getPaymentModuleId() == $model->getId(); return $order->getPaymentModuleId() == $model->getId();
@@ -315,7 +316,8 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
* @param Order $order an order * @param Order $order an order
* @return bool true if this module is the delivery module for the given order. * @return bool true if this module is the delivery module for the given order.
*/ */
public function isDeliveryModuleFor(Order $order) { public function isDeliveryModuleFor(Order $order)
{
$model = $this->getModuleModel(); $model = $this->getModuleModel();
return $order->getDeliveryModuleId() == $model->getId(); return $order->getDeliveryModuleId() == $model->getId();
@@ -333,8 +335,8 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
* *
* @return float|int the current order amount. * @return float|int the current order amount.
*/ */
public function getCurrentOrderTotalAmount($with_tax = true, $with_discount = true, $with_postage = true) { public function getCurrentOrderTotalAmount($with_tax = true, $with_discount = true, $with_postage = true)
{
/** @var Session $session */ /** @var Session $session */
$session = $this->getRequest()->getSession(); $session = $this->getRequest()->getSession();
@@ -420,7 +422,6 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
public function preActivation(ConnectionInterface $con = null) public function preActivation(ConnectionInterface $con = null)
{ {
// Override this method to do something useful. // Override this method to do something useful.
return true; return true;
} }
@@ -443,11 +444,9 @@ class BaseModule extends ContainerAware implements BaseModuleInterface
public function preDeactivation(ConnectionInterface $con = null) public function preDeactivation(ConnectionInterface $con = null)
{ {
// Override this method to do something useful. // Override this method to do something useful.
return true; return true;
} }
public function postDeactivation(ConnectionInterface $con = null) public function postDeactivation(ConnectionInterface $con = null)
{ {
// Override this method to do something useful. // Override this method to do something useful.