@@ -35,7 +35,7 @@ |
||
| 35 | 35 | ->findAll(); |
| 36 | 36 | |
| 37 | 37 | /** @var SkuskuProductInterface $product */ |
| 38 | - foreach($products as $product) { |
|
| 38 | + foreach ($products as $product) { |
|
| 39 | 39 | /** @var Form $addToCartForm */ |
| 40 | 40 | $addToCartForm = $this->createForm(AddToCartType::class, array( |
| 41 | 41 | 'idProduct' => $product->getId() |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | $resultArray = array(); |
| 42 | 42 | |
| 43 | - foreach($this->getAbstractEntities() as $key => $value){ |
|
| 43 | + foreach ($this->getAbstractEntities() as $key => $value) { |
|
| 44 | 44 | $resultArray[] = array( |
| 45 | 45 | 'interface' => $key, |
| 46 | 46 | 'concrete' => $value |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | /** @var SkuskuCurrencyInterface $locale */ |
| 66 | 66 | $locale = $this->em->getRepository(SkuskuCurrencyInterface::class)->findOneByIsoCode($currencyIdentifier); |
| 67 | 67 | |
| 68 | - if( !$locale ) |
|
| 68 | + if (!$locale) |
|
| 69 | 69 | throw new CurrencyNotFoundException(); |
| 70 | 70 | |
| 71 | 71 | return $locale; |
@@ -65,8 +65,9 @@ |
||
| 65 | 65 | /** @var SkuskuCurrencyInterface $locale */ |
| 66 | 66 | $locale = $this->em->getRepository(SkuskuCurrencyInterface::class)->findOneByIsoCode($currencyIdentifier); |
| 67 | 67 | |
| 68 | - if( !$locale ) |
|
| 69 | - throw new CurrencyNotFoundException(); |
|
| 68 | + if( !$locale ) { |
|
| 69 | + throw new CurrencyNotFoundException(); |
|
| 70 | + } |
|
| 70 | 71 | |
| 71 | 72 | return $locale; |
| 72 | 73 | } |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | $container->setParameter('ggggino_skuskucart.stepform_class', $config['stepform_class']); |
| 33 | 33 | |
| 34 | - foreach($config['templates'] as $key => $template) { |
|
| 35 | - $container->setParameter('ggggino_skuskucart.templates.' . $key, $template); |
|
| 34 | + foreach ($config['templates'] as $key => $template) { |
|
| 35 | + $container->setParameter('ggggino_skuskucart.templates.'.$key, $template); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | private function prependPayumGateway(ContainerBuilder $container) |
| 97 | 97 | { |
| 98 | - if( !$container->hasExtension('payum') ){ |
|
| 98 | + if (!$container->hasExtension('payum')) { |
|
| 99 | 99 | die('non ce payum'); |
| 100 | 100 | } |
| 101 | 101 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $arrayEntities = $arrayEntities['gateways']; |
| 111 | 111 | $finalEntities = array(); |
| 112 | 112 | |
| 113 | - foreach( $arrayEntities as $key => $value ){ |
|
| 113 | + foreach ($arrayEntities as $key => $value) { |
|
| 114 | 114 | $labelName = isset($value['name']) ? $value['name'] : $key; |
| 115 | 115 | $finalEntities[$labelName] = $key; |
| 116 | 116 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function process(ContainerBuilder $container) |
| 20 | 20 | { |
| 21 | - if( !$container->hasDefinition('doctrine.orm.listeners.resolve_target_entity') ) |
|
| 21 | + if (!$container->hasDefinition('doctrine.orm.listeners.resolve_target_entity')) |
|
| 22 | 22 | return; |
| 23 | 23 | } |
| 24 | 24 | } |
| 25 | 25 | \ No newline at end of file |
@@ -18,7 +18,8 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function process(ContainerBuilder $container) |
| 20 | 20 | { |
| 21 | - if( !$container->hasDefinition('doctrine.orm.listeners.resolve_target_entity') ) |
|
| 22 | - return; |
|
| 21 | + if( !$container->hasDefinition('doctrine.orm.listeners.resolve_target_entity') ) { |
|
| 22 | + return; |
|
| 23 | + } |
|
| 23 | 24 | } |
| 24 | 25 | } |
| 25 | 26 | \ No newline at end of file |
@@ -10,5 +10,5 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | class OrderRepository extends \Doctrine\ORM\EntityRepository |
| 12 | 12 | { |
| 13 | - public function findByUser(){} |
|
| 13 | + public function findByUser() {} |
|
| 14 | 14 | } |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | */ |
| 100 | 100 | public function registerContainerConfiguration(LoaderInterface $loader) |
| 101 | 101 | { |
| 102 | - $loader->load(__DIR__ . '/app/config/config.yml'); |
|
| 102 | + $loader->load(__DIR__.'/app/config/config.yml'); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | public function serialize() |
@@ -12,8 +12,8 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function __construct($message = "", $code = 0, \Exception $previous = null) |
| 14 | 14 | { |
| 15 | - if( !empty($message) ) |
|
| 16 | - $message = ": " . $message; |
|
| 15 | + if (!empty($message)) |
|
| 16 | + $message = ": ".$message; |
|
| 17 | 17 | |
| 18 | 18 | $finalMessage = sprintf("Currency not found, maybe the db table is empty%s", $message); |
| 19 | 19 | parent::__construct($finalMessage, $code, $previous); |
@@ -12,8 +12,9 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function __construct($message = "", $code = 0, \Exception $previous = null) |
| 14 | 14 | { |
| 15 | - if( !empty($message) ) |
|
| 16 | - $message = ": " . $message; |
|
| 15 | + if( !empty($message) ) { |
|
| 16 | + $message = ": " . $message; |
|
| 17 | + } |
|
| 17 | 18 | |
| 18 | 19 | $finalMessage = sprintf("Currency not found, maybe the db table is empty%s", $message); |
| 19 | 20 | parent::__construct($finalMessage, $code, $previous); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | public function renderPreviewCart($template = null) |
| 100 | 100 | { |
| 101 | - if( !$template ) |
|
| 101 | + if (!$template) |
|
| 102 | 102 | $template = $this->templatePreviewCart; |
| 103 | 103 | |
| 104 | 104 | /** @var SkuskuCart $cart */ |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | public function renderCurrencyCart($template = null) |
| 119 | 119 | { |
| 120 | - if( !$template ) |
|
| 120 | + if (!$template) |
|
| 121 | 121 | $template = $this->templateCurrencyCart; |
| 122 | 122 | |
| 123 | 123 | /** @var SkuskuCurrencyInterface[] $currencies */ |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | public function renderLangCart($template = null) |
| 139 | 139 | { |
| 140 | - if( !$template ) |
|
| 140 | + if (!$template) |
|
| 141 | 141 | $template = $this->templateLangCart; |
| 142 | 142 | |
| 143 | 143 | /** @var SkuskuLangInterface[] $languages */ |
@@ -98,8 +98,9 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | public function renderPreviewCart($template = null) |
| 100 | 100 | { |
| 101 | - if( !$template ) |
|
| 102 | - $template = $this->templatePreviewCart; |
|
| 101 | + if( !$template ) { |
|
| 102 | + $template = $this->templatePreviewCart; |
|
| 103 | + } |
|
| 103 | 104 | |
| 104 | 105 | /** @var SkuskuCart $cart */ |
| 105 | 106 | $cart = $this->cartManager->getCartFromCustomer(); |
@@ -117,8 +118,9 @@ discard block |
||
| 117 | 118 | */ |
| 118 | 119 | public function renderCurrencyCart($template = null) |
| 119 | 120 | { |
| 120 | - if( !$template ) |
|
| 121 | - $template = $this->templateCurrencyCart; |
|
| 121 | + if( !$template ) { |
|
| 122 | + $template = $this->templateCurrencyCart; |
|
| 123 | + } |
|
| 122 | 124 | |
| 123 | 125 | /** @var SkuskuCurrencyInterface[] $currencies */ |
| 124 | 126 | $currencies = $this->currencyManager->getActiveCurrencies(); |
@@ -137,8 +139,9 @@ discard block |
||
| 137 | 139 | */ |
| 138 | 140 | public function renderLangCart($template = null) |
| 139 | 141 | { |
| 140 | - if( !$template ) |
|
| 141 | - $template = $this->templateLangCart; |
|
| 142 | + if( !$template ) { |
|
| 143 | + $template = $this->templateLangCart; |
|
| 144 | + } |
|
| 142 | 145 | |
| 143 | 146 | /** @var SkuskuLangInterface[] $languages */ |
| 144 | 147 | $languages = $this->langManager->getActiveLanguages(); |