From 2532a3bb4b0efef23db1d3f5edd25a512c4f67d1 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Thu, 10 Apr 2014 12:05:45 +0200 Subject: [PATCH] fix cs --- core/lib/Thelia/Action/Currency.php | 1 - .../Command/Skeleton/Module/I18n/en_US.php | 8 +-- .../Command/Skeleton/Module/I18n/fr_FR.php | 8 +-- .../Command/Skeleton/Module/routing.xml | 62 +++++++++---------- .../Admin/AbstractSeoCrudController.php | 4 +- .../Event/Cart/CartItemDuplicationItem.php | 6 +- .../Thelia/Core/Event/Order/OrderEvent.php | 2 - .../Thelia/Core/Template/ParserInterface.php | 2 +- core/lib/Thelia/Model/OrderProduct.php | 2 - core/lib/Thelia/Module/BaseModule.php | 35 +++++------ 10 files changed, 61 insertions(+), 69 deletions(-) diff --git a/core/lib/Thelia/Action/Currency.php b/core/lib/Thelia/Action/Currency.php index 2a276cd9e..017e4a881 100644 --- a/core/lib/Thelia/Action/Currency.php +++ b/core/lib/Thelia/Action/Currency.php @@ -23,7 +23,6 @@ namespace Thelia\Action; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Thelia\Core\Event\ActionEvent; diff --git a/core/lib/Thelia/Command/Skeleton/Module/I18n/en_US.php b/core/lib/Thelia/Command/Skeleton/Module/I18n/en_US.php index f32e11983..0b4fa142b 100644 --- a/core/lib/Thelia/Command/Skeleton/Module/I18n/en_US.php +++ b/core/lib/Thelia/Command/Skeleton/Module/I18n/en_US.php @@ -1,4 +1,4 @@ - 'The displayed english string', -); \ No newline at end of file + 'The displayed english string', +); diff --git a/core/lib/Thelia/Command/Skeleton/Module/I18n/fr_FR.php b/core/lib/Thelia/Command/Skeleton/Module/I18n/fr_FR.php index fd88a21eb..370862450 100644 --- a/core/lib/Thelia/Command/Skeleton/Module/I18n/fr_FR.php +++ b/core/lib/Thelia/Command/Skeleton/Module/I18n/fr_FR.php @@ -1,4 +1,4 @@ - 'La traduction française de la chaine', -); \ No newline at end of file + 'La traduction française de la chaine', +); diff --git a/core/lib/Thelia/Command/Skeleton/Module/routing.xml b/core/lib/Thelia/Command/Skeleton/Module/routing.xml index 22d919792..12c942d0b 100644 --- a/core/lib/Thelia/Command/Skeleton/Module/routing.xml +++ b/core/lib/Thelia/Command/Skeleton/Module/routing.xml @@ -1,31 +1,31 @@ - - - - - - - + + + + + + + diff --git a/core/lib/Thelia/Controller/Admin/AbstractSeoCrudController.php b/core/lib/Thelia/Controller/Admin/AbstractSeoCrudController.php index 1d6cb06d5..0976696d8 100644 --- a/core/lib/Thelia/Controller/Admin/AbstractSeoCrudController.php +++ b/core/lib/Thelia/Controller/Admin/AbstractSeoCrudController.php @@ -221,7 +221,7 @@ abstract class AbstractSeoCrudController extends AbstractCrudController // Pass it to the parser $this->getParserContext()->addForm($changeForm); } - + if (false !== $error_msg) { $this->setupFormErrorContext( $this->getTranslator()->trans("%obj SEO modification", array('%obj' => $this->objectName)), @@ -229,7 +229,7 @@ abstract class AbstractSeoCrudController extends AbstractCrudController $updateSeoForm, $ex ); - + // At this point, the form has errors, and should be redisplayed. return $this->renderEditionTemplate(); } diff --git a/core/lib/Thelia/Core/Event/Cart/CartItemDuplicationItem.php b/core/lib/Thelia/Core/Event/Cart/CartItemDuplicationItem.php index 2ea8b04e6..fa6d297e1 100644 --- a/core/lib/Thelia/Core/Event/Cart/CartItemDuplicationItem.php +++ b/core/lib/Thelia/Core/Event/Cart/CartItemDuplicationItem.php @@ -26,7 +26,6 @@ namespace Thelia\Core\Event\Cart; use Thelia\Core\Event\ActionEvent; use Thelia\Model\CartItem; - /** * Class CartItemDuplicationItem * @package Thelia\Core\Event\Cart @@ -44,7 +43,7 @@ class CartItemDuplicationItem extends ActionEvent */ protected $newItem; - function __construct(CartItem $newItem, CartItem $oldItem) + public function __construct(CartItem $newItem, CartItem $oldItem) { $this->newItem = $newItem; $this->oldItem = $oldItem; @@ -66,5 +65,4 @@ class CartItemDuplicationItem extends ActionEvent return $this->oldItem; } - -} \ No newline at end of file +} diff --git a/core/lib/Thelia/Core/Event/Order/OrderEvent.php b/core/lib/Thelia/Core/Event/Order/OrderEvent.php index c8ebeb033..503f6b4a8 100644 --- a/core/lib/Thelia/Core/Event/Order/OrderEvent.php +++ b/core/lib/Thelia/Core/Event/Order/OrderEvent.php @@ -81,8 +81,6 @@ class OrderEvent extends ActionEvent return $this->cartItemId; } - - /** * @param Order $order */ diff --git a/core/lib/Thelia/Core/Template/ParserInterface.php b/core/lib/Thelia/Core/Template/ParserInterface.php index 6156ca859..c9cf2eceb 100644 --- a/core/lib/Thelia/Core/Template/ParserInterface.php +++ b/core/lib/Thelia/Core/Template/ParserInterface.php @@ -63,7 +63,7 @@ interface ParserInterface * Create a variable that will be available in the templates * * @param string $variable the variable name - * @param mixed $value the value of the variable + * @param mixed $value the value of the variable */ public function assign($variable, $value); } diff --git a/core/lib/Thelia/Model/OrderProduct.php b/core/lib/Thelia/Model/OrderProduct.php index dfd23d00a..5f87cbc97 100644 --- a/core/lib/Thelia/Model/OrderProduct.php +++ b/core/lib/Thelia/Model/OrderProduct.php @@ -31,8 +31,6 @@ class OrderProduct extends BaseOrderProduct return $this->cartIemId; } - - /** * {@inheritDoc} */ diff --git a/core/lib/Thelia/Module/BaseModule.php b/core/lib/Thelia/Module/BaseModule.php index 1a3e54be9..7fc3a16f7 100644 --- a/core/lib/Thelia/Module/BaseModule.php +++ b/core/lib/Thelia/Module/BaseModule.php @@ -200,8 +200,8 @@ class BaseModule extends ContainerAware implements BaseModuleInterface * TODO : clarify the purpose of ModuleImage. How this table will be used elswhere in Thelia ? * TODO : this method doesn't take care of internationalization. This is a bug. * - * @param Module $module the module - * @param string $folderPath the image folder path + * @param Module $module the module + * @param string $folderPath the image folder path * @param ConnectionInterface $con * * @throws \Thelia\Exception\ModuleException @@ -300,10 +300,11 @@ class BaseModule extends ContainerAware implements BaseModuleInterface /** * Check if this module is the payment module for a given order * - * @param Order $order an order - * @return bool true if this module is the payment module for the given order. + * @param Order $order an 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(); return $order->getPaymentModuleId() == $model->getId(); @@ -312,10 +313,11 @@ class BaseModule extends ContainerAware implements BaseModuleInterface /** * Check if this module is the delivery module for a given order * - * @param Order $order an order - * @return bool true if this module is the delivery module for the given order. + * @param Order $order an 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(); return $order->getDeliveryModuleId() == $model->getId(); @@ -327,14 +329,14 @@ class BaseModule extends ContainerAware implements BaseModuleInterface * get the total amount of an order already stored in the database. For such orders, use * Order::getTotalAmount() method. * - * @param bool $with_tax if true, to total price will include tax amount + * @param bool $with_tax if true, to total price will include tax amount * @param bool $with_discount if true, the total price will include discount, if any - * @param bool $with_postage if true, the total price will include the delivery costs, if any. + * @param bool $with_postage if true, the total price will include the delivery costs, if any. * * @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 */ $session = $this->getRequest()->getSession(); @@ -420,7 +422,6 @@ class BaseModule extends ContainerAware implements BaseModuleInterface public function preActivation(ConnectionInterface $con = null) { // Override this method to do something useful. - return true; } @@ -437,17 +438,15 @@ class BaseModule extends ContainerAware implements BaseModuleInterface /** * This method is called before the module de-activation, and may prevent it by returning false. * - * @param ConnectionInterface $con - * @return bool true to continue module de-activation, false to prevent it. + * @param ConnectionInterface $con + * @return bool true to continue module de-activation, false to prevent it. */ public function preDeactivation(ConnectionInterface $con = null) { // Override this method to do something useful. - return true; } - public function postDeactivation(ConnectionInterface $con = null) { // Override this method to do something useful. @@ -458,7 +457,7 @@ class BaseModule extends ContainerAware implements BaseModuleInterface * to delete its data. * * @param ConnectionInterface $con - * @param bool $deleteModuleData if true, the module should remove all its data from the system. + * @param bool $deleteModuleData if true, the module should remove all its data from the system. */ public function destroy(ConnectionInterface $con = null, $deleteModuleData = false) {