@@ -89,8 +89,7 @@ discard block |
||
| 89 | 89 | && in_array( 'ROLE_SUPER_ADMIN', (array) $token->getUser()->getRoles() ) ) |
| 90 | 90 | { |
| 91 | 91 | $helper = new \Aimeos\MW\View\Helper\Access\All( $view ); |
| 92 | - } |
|
| 93 | - else |
|
| 92 | + } else |
|
| 94 | 93 | { |
| 95 | 94 | $fcn = function() use ( $container, $context ) { |
| 96 | 95 | return $container->get( 'aimeos.support' )->getGroups( $context ); |
@@ -244,8 +243,7 @@ discard block |
||
| 244 | 243 | { |
| 245 | 244 | $i18n = $this->container->get( 'aimeos.i18n' )->get( array( $locale ) ); |
| 246 | 245 | $translation = $i18n[$locale]; |
| 247 | - } |
|
| 248 | - else |
|
| 246 | + } else |
|
| 249 | 247 | { |
| 250 | 248 | $translation = new \Aimeos\MW\Translation\None( 'en' ); |
| 251 | 249 | } |
@@ -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->createItem(); |
| 82 | 85 | } |
| 83 | 86 | |
@@ -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 | |
@@ -71,9 +71,12 @@ |
||
| 71 | 71 | |
| 72 | 72 | $manager = \Aimeos\MShop::create( $context, 'customer' ); |
| 73 | 73 | |
| 74 | - try { |
|
| 74 | + try |
|
| 75 | + { |
|
| 75 | 76 | $item = $manager->findItem( $email ); |
| 76 | - } catch( \Aimeos\MShop\Exception $e ) { |
|
| 77 | + } |
|
| 78 | + catch( \Aimeos\MShop\Exception $e ) |
|
| 79 | + { |
|
| 77 | 80 | $item = $manager->createItem(); |
| 78 | 81 | } |
| 79 | 82 | |
@@ -216,8 +216,7 @@ |
||
| 216 | 216 | $username = $token->getUser()->getUsername(); |
| 217 | 217 | $userid = $token->getUser()->getId(); |
| 218 | 218 | $context->setUserId( $userid ); |
| 219 | - $context->setGroupIds( function() use ( $context, $userid ) |
|
| 220 | - { |
|
| 219 | + $context->setGroupIds( function() use ( $context, $userid ) { |
|
| 221 | 220 | $manager = \Aimeos\MShop::create( $context, 'customer' ); |
| 222 | 221 | return $manager->getItem( $userid, array( 'customer/group' ) )->getGroups(); |
| 223 | 222 | } ); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | public function deleteAction( ServerRequestInterface $request, string $resource ) : \Psr\Http\Message\ResponseInterface |
| 34 | 34 | { |
| 35 | - return $this->createClient( $request, $resource )->delete( $request, (new Psr17Factory)->createResponse() ); |
|
| 35 | + return $this->createClient( $request, $resource )->delete( $request, ( new Psr17Factory )->createResponse() ); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function getAction( ServerRequestInterface $request, string $resource ) : \Psr\Http\Message\ResponseInterface |
| 47 | 47 | { |
| 48 | - return $this->createClient( $request, $resource )->get( $request, (new Psr17Factory)->createResponse() ); |
|
| 48 | + return $this->createClient( $request, $resource )->get( $request, ( new Psr17Factory )->createResponse() ); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function patchAction( ServerRequestInterface $request, string $resource ) : \Psr\Http\Message\ResponseInterface |
| 60 | 60 | { |
| 61 | - return $this->createClient( $request, $resource )->patch( $request, (new Psr17Factory)->createResponse() ); |
|
| 61 | + return $this->createClient( $request, $resource )->patch( $request, ( new Psr17Factory )->createResponse() ); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | public function postAction( ServerRequestInterface $request, string $resource ) : \Psr\Http\Message\ResponseInterface |
| 73 | 73 | { |
| 74 | - return $this->createClient( $request, $resource )->post( $request, (new Psr17Factory)->createResponse() ); |
|
| 74 | + return $this->createClient( $request, $resource )->post( $request, ( new Psr17Factory )->createResponse() ); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function putAction( ServerRequestInterface $request, string $resource ) : \Psr\Http\Message\ResponseInterface |
| 86 | 86 | { |
| 87 | - return $this->createClient( $request, $resource )->put( $request, (new Psr17Factory)->createResponse() ); |
|
| 87 | + return $this->createClient( $request, $resource )->put( $request, ( new Psr17Factory )->createResponse() ); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | public function optionsAction( ServerRequestInterface $request, string $resource = '' ) : \Psr\Http\Message\ResponseInterface |
| 99 | 99 | { |
| 100 | - return $this->createClient( $request, $resource )->options( $request, (new Psr17Factory)->createResponse() ); |
|
| 100 | + return $this->createClient( $request, $resource )->options( $request, ( new Psr17Factory )->createResponse() ); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | string $site = 'default' ) : \Psr\Http\Message\ResponseInterface |
| 36 | 36 | { |
| 37 | 37 | $client = $this->createAdmin( $site, $resource, $request->getAttribute( 'lang', 'en' ) ); |
| 38 | - return $client->delete( $request, (new Psr17Factory)->createResponse() ); |
|
| 38 | + return $client->delete( $request, ( new Psr17Factory )->createResponse() ); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | string $site = 'default' ) : \Psr\Http\Message\ResponseInterface |
| 52 | 52 | { |
| 53 | 53 | $client = $this->createAdmin( $site, $resource, $request->getAttribute( 'lang', 'en' ) ); |
| 54 | - return $client->get( $request, (new Psr17Factory)->createResponse() ); |
|
| 54 | + return $client->get( $request, ( new Psr17Factory )->createResponse() ); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | string $site = 'default' ) : \Psr\Http\Message\ResponseInterface |
| 68 | 68 | { |
| 69 | 69 | $client = $this->createAdmin( $site, $resource, $request->getAttribute( 'lang', 'en' ) ); |
| 70 | - return $client->patch( $request, (new Psr17Factory)->createResponse() ); |
|
| 70 | + return $client->patch( $request, ( new Psr17Factory )->createResponse() ); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | string $site = 'default' ) : \Psr\Http\Message\ResponseInterface |
| 84 | 84 | { |
| 85 | 85 | $client = $this->createAdmin( $site, $resource, $request->getAttribute( 'lang', 'en' ) ); |
| 86 | - return $client->post( $request, (new Psr17Factory)->createResponse() ); |
|
| 86 | + return $client->post( $request, ( new Psr17Factory )->createResponse() ); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | string $site = 'default' ) : \Psr\Http\Message\ResponseInterface |
| 100 | 100 | { |
| 101 | 101 | $client = $this->createAdmin( $site, $resource, $request->getAttribute( 'lang', 'en' ) ); |
| 102 | - return $client->put( $request, (new Psr17Factory)->createResponse() ); |
|
| 102 | + return $client->put( $request, ( new Psr17Factory )->createResponse() ); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | string $site = 'default' ) : \Psr\Http\Message\ResponseInterface |
| 116 | 116 | { |
| 117 | 117 | $client = $this->createAdmin( $site, $resource, $request->getAttribute( 'lang', 'en' ) ); |
| 118 | - return $client->options( $request, (new Psr17Factory)->createResponse() ); |
|
| 118 | + return $client->options( $request, ( new Psr17Factory )->createResponse() ); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | |