fix typo in method name

This commit is contained in:
Manuel Raynaud
2014-02-24 15:27:18 +01:00
parent e56ed20dfa
commit 235487b52b
2 changed files with 10 additions and 10 deletions

View File

@@ -43,7 +43,7 @@ class ShippingZone extends BaseAction implements EventSubscriberInterface
$areaDelivery
->setAreaId($event->getAreaId())
->setDeliveryModuleId($event->getShoppingZoneId())
->setDeliveryModuleId($event->getShippingZoneId())
->save();
}
@@ -51,13 +51,13 @@ class ShippingZone extends BaseAction implements EventSubscriberInterface
{
$areaDelivery = AreaDeliveryModuleQuery::create()
->filterByAreaId($event->getAreaId())
->filterByDeliveryModuleId($event->getShoppingZoneId())
->filterByDeliveryModuleId($event->getShippingZoneId())
->findOne();
if ($areaDelivery) {
$areaDelivery->delete();
} else {
throw new \RuntimeException(sprintf('areaDeliveryModule not found with area_id = %d and delivery_module_id = %d', $event->getAreaId(), $event->getShoppingZoneId()));
throw new \RuntimeException(sprintf('areaDeliveryModule not found with area_id = %d and delivery_module_id = %d', $event->getAreaId(), $event->getShippingZoneId()));
}
}

View File

@@ -32,12 +32,12 @@ use Thelia\Core\Event\ActionEvent;
class ShippingZoneAddAreaEvent extends ActionEvent
{
protected $area_id;
protected $shopping_zone_id;
protected $shipping_zone_id;
public function __construct($area_id, $shopping_zone_id)
public function __construct($area_id, $shipping_zone_id)
{
$this->area_id = $area_id;
$this->shopping_zone_id = $shopping_zone_id;
$this->shipping_zone_id = $shipping_zone_id;
}
/**
@@ -65,9 +65,9 @@ class ShippingZoneAddAreaEvent extends ActionEvent
*
* @return $this
*/
public function setShoppingZoneId($shopping_zone_id)
public function setShippingZoneId($shipping_zone_id)
{
$this->shopping_zone_id = $shopping_zone_id;
$this->shipping_zone_id = $shipping_zone_id;
return $this;
}
@@ -75,9 +75,9 @@ class ShippingZoneAddAreaEvent extends ActionEvent
/**
* @return mixed
*/
public function getShoppingZoneId()
public function getShippingZoneId()
{
return $this->shopping_zone_id;
return $this->shipping_zone_id;
}
}