@@ -41,7 +41,7 @@ |
||
| 41 | 41 | |
| 42 | 42 | |
| 43 | 43 | public function testFilterTree() |
| 44 | - { |
|
| 44 | + { |
|
| 45 | 45 | $client = static::createClient(); |
| 46 | 46 | $crawler = $client->request( 'GET', '/unittest/de/EUR/shop/' ); |
| 47 | 47 | |
@@ -75,9 +75,12 @@ |
||
| 75 | 75 | { |
| 76 | 76 | $localeManager = \Aimeos\MShop::create( $context, 'locale' ); |
| 77 | 77 | |
| 78 | - try { |
|
| 78 | + try |
|
| 79 | + { |
|
| 79 | 80 | $localeItem = $localeManager->bootstrap( $site, '', '', false, null, true ); |
| 80 | - } catch( \Aimeos\MShop\Exception $e ) { |
|
| 81 | + } |
|
| 82 | + catch( \Aimeos\MShop\Exception $e ) |
|
| 83 | + { |
|
| 81 | 84 | $localeItem = $localeManager->create(); |
| 82 | 85 | } |
| 83 | 86 | |
@@ -235,14 +235,15 @@ |
||
| 235 | 235 | { |
| 236 | 236 | \Composer\Factory::createHttpDownloader( $event->getIO(), $config ) |
| 237 | 237 | ->get( 'https://api.github.com/graphql', $options ); |
| 238 | - } |
|
| 239 | - else |
|
| 238 | + } else |
|
| 240 | 239 | { |
| 241 | 240 | \Composer\Factory::createRemoteFilesystem( $event->getIO(), $config ) |
| 242 | 241 | ->getContents( 'github.com', 'https://api.github.com/graphql', false, $options ); |
| 243 | 242 | } |
| 244 | 243 | } |
| 245 | - catch( \Exception $e ) {} |
|
| 244 | + catch( \Exception $e ) |
|
| 245 | + { |
|
| 246 | +} |
|
| 246 | 247 | } |
| 247 | 248 | |
| 248 | 249 | |
@@ -1,8 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | - Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], |
|
| 5 | - Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true], |
|
| 6 | - Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], |
|
| 7 | - Aimeos\ShopBundle\AimeosShopBundle::class => ['all' => true], |
|
| 4 | + Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], |
|
| 5 | + Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true], |
|
| 6 | + Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], |
|
| 7 | + Aimeos\ShopBundle\AimeosShopBundle::class => ['all' => true], |
|
| 8 | 8 | ]; |
| 9 | 9 | \ No newline at end of file |
@@ -289,10 +289,11 @@ |
||
| 289 | 289 | return $context->user()?->getGroups() ?? []; |
| 290 | 290 | } ); |
| 291 | 291 | } |
| 292 | - catch( \Exception $e ) {} // avoid errors if user is assigned to another site |
|
| 292 | + catch( \Exception $e ) |
|
| 293 | + { |
|
| 294 | +} // avoid errors if user is assigned to another site |
|
| 293 | 295 | } |
| 294 | - } |
|
| 295 | - elseif( $this->container->has( 'request_stack' ) |
|
| 296 | + } elseif( $this->container->has( 'request_stack' ) |
|
| 296 | 297 | && ( $request = $this->container->get( 'request_stack' )->getCurrentRequest() ) !== null |
| 297 | 298 | ) { |
| 298 | 299 | $username = $request->getClientIp(); |
@@ -96,8 +96,7 @@ discard block |
||
| 96 | 96 | && in_array( 'ROLE_SUPER_ADMIN', (array) $user->getRoles() ) |
| 97 | 97 | ) { |
| 98 | 98 | $helper = new \Aimeos\Base\View\Helper\Access\All( $view ); |
| 99 | - } |
|
| 100 | - else |
|
| 99 | + } else |
|
| 101 | 100 | { |
| 102 | 101 | $helper = new \Aimeos\Base\View\Helper\Access\Standard( $view, function() use ( $context ) { |
| 103 | 102 | return $context->groups(); |
@@ -135,9 +134,12 @@ discard block |
||
| 135 | 134 | */ |
| 136 | 135 | protected function addCsrf( \Aimeos\Base\View\Iface $view ) |
| 137 | 136 | { |
| 138 | - try { |
|
| 137 | + try |
|
| 138 | + { |
|
| 139 | 139 | $token = $this->tokenManager->getToken( '_token' )->getValue(); |
| 140 | - } catch( \Symfony\Component\HttpFoundation\Exception\SessionNotFoundException $e ) { |
|
| 140 | + } |
|
| 141 | + catch( \Symfony\Component\HttpFoundation\Exception\SessionNotFoundException $e ) |
|
| 142 | + { |
|
| 141 | 143 | $token = ''; |
| 142 | 144 | } |
| 143 | 145 | |
@@ -253,8 +255,7 @@ discard block |
||
| 253 | 255 | { |
| 254 | 256 | $i18n = $this->container->get( 'aimeos.i18n' )->get( array( $locale ) ); |
| 255 | 257 | $translation = $i18n[$locale]; |
| 256 | - } |
|
| 257 | - else |
|
| 258 | + } else |
|
| 258 | 259 | { |
| 259 | 260 | $translation = new \Aimeos\Base\Translation\None( 'en' ); |
| 260 | 261 | } |
@@ -82,9 +82,12 @@ |
||
| 82 | 82 | |
| 83 | 83 | $manager = \Aimeos\MShop::create( $context, 'customer' ); |
| 84 | 84 | |
| 85 | - try { |
|
| 85 | + try |
|
| 86 | + { |
|
| 86 | 87 | $item = $manager->find( $email, ['group'] ); |
| 87 | - } catch( \Aimeos\MShop\Exception $e ) { |
|
| 88 | + } |
|
| 89 | + catch( \Aimeos\MShop\Exception $e ) |
|
| 90 | + { |
|
| 88 | 91 | $item = $manager->create(); |
| 89 | 92 | } |
| 90 | 93 | |