@@ -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 | } |
@@ -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 |
@@ -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,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(); |
@@ -100,8 +100,9 @@ discard block |
||
| 100 | 100 | $paymentMethod = $data->getPaymentMethod(); |
| 101 | 101 | |
| 102 | 102 | // se non è settato vuol dire che non ci sono ancora arrivato |
| 103 | - if( !$paymentMethod ) |
|
| 104 | - return false; |
|
| 103 | + if( !$paymentMethod ) { |
|
| 104 | + return false; |
|
| 105 | + } |
|
| 105 | 106 | |
| 106 | 107 | /** @var GatewayInterface $gateway */ |
| 107 | 108 | $gateway = $this->payum->getGateway($paymentMethod); |
@@ -125,8 +126,9 @@ discard block |
||
| 125 | 126 | if ($this->isValid($form)) { |
| 126 | 127 | $this->saveCurrentStepData($form); |
| 127 | 128 | |
| 128 | - if( !$this->allowAnonymous ) |
|
| 129 | - throw new AccessDeniedException("Anonymous users cannot buy"); |
|
| 129 | + if( !$this->allowAnonymous ) { |
|
| 130 | + throw new AccessDeniedException("Anonymous users cannot buy"); |
|
| 131 | + } |
|
| 130 | 132 | |
| 131 | 133 | // @todo done this because craue form flow doesn't permit to add a custom action |
| 132 | 134 | if( $this->requestStack->getCurrentRequest()->request->get('flow_cart_transition') == self::TRANSITION_RESET_CART ) { |