@@ -10,17 +10,17 @@ |
||
10 | 10 | public function testTerms() |
11 | 11 | { |
12 | 12 | $client = static::createClient(); |
13 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/terms' ); |
|
13 | + $crawler = $client->request('GET', '/unittest/de/EUR/terms'); |
|
14 | 14 | |
15 | - $this->assertEquals( 1, $crawler->filter( 'body:contains("Terms")' )->count() ); |
|
15 | + $this->assertEquals(1, $crawler->filter('body:contains("Terms")')->count()); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | |
19 | 19 | public function testPrivacy() |
20 | 20 | { |
21 | 21 | $client = static::createClient(); |
22 | - $crawler = $client->request( 'GET', '/unittest/de/EUR/privacy' ); |
|
22 | + $crawler = $client->request('GET', '/unittest/de/EUR/privacy'); |
|
23 | 23 | |
24 | - $this->assertEquals( 1, $crawler->filter( 'body:contains("Privacy")' )->count() ); |
|
24 | + $this->assertEquals(1, $crawler->filter('body:contains("Privacy")')->count()); |
|
25 | 25 | } |
26 | 26 | } |
@@ -14,13 +14,13 @@ |
||
14 | 14 | $kernel = $this->createKernel(); |
15 | 15 | $kernel->boot(); |
16 | 16 | |
17 | - $application = new Application( $kernel ); |
|
18 | - $application->add( new Command\SetupCommand() ); |
|
17 | + $application = new Application($kernel); |
|
18 | + $application->add(new Command\SetupCommand()); |
|
19 | 19 | |
20 | - $command = $application->find( 'aimeos:setup' ); |
|
21 | - $commandTester = new CommandTester( $command ); |
|
22 | - $commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest', 'tplsite' => 'unittest', '--option' => 'setup/default/demo:0' ) ); |
|
20 | + $command = $application->find('aimeos:setup'); |
|
21 | + $commandTester = new CommandTester($command); |
|
22 | + $commandTester->execute(array('command' => $command->getName(), 'site' => 'unittest', 'tplsite' => 'unittest', '--option' => 'setup/default/demo:0')); |
|
23 | 23 | |
24 | - $this->assertEquals( 0, $commandTester->getStatusCode() ); |
|
24 | + $this->assertEquals(0, $commandTester->getStatusCode()); |
|
25 | 25 | } |
26 | 26 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function privacyAction() |
30 | 30 | { |
31 | - return $this->render( 'AimeosShopBundle:Page:privacy.html.twig' ); |
|
31 | + return $this->render('AimeosShopBundle:Page:privacy.html.twig'); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | |
@@ -39,6 +39,6 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function termsAction() |
41 | 41 | { |
42 | - return $this->render( 'AimeosShopBundle:Page:terms.html.twig' ); |
|
42 | + return $this->render('AimeosShopBundle:Page:terms.html.twig'); |
|
43 | 43 | } |
44 | 44 | } |
@@ -25,15 +25,15 @@ |
||
25 | 25 | * @param InputInterface $input Input object |
26 | 26 | * @return \Aimeos\MShop\Locale\Item\Site\Interface[] List of site items |
27 | 27 | */ |
28 | - protected function getSiteItems( \Aimeos\MShop\Context\Item\Iface $context, InputInterface $input ) |
|
28 | + protected function getSiteItems(\Aimeos\MShop\Context\Item\Iface $context, InputInterface $input) |
|
29 | 29 | { |
30 | - $manager = \Aimeos\MShop\Locale\Manager\Factory::createManager( $context )->getSubManager( 'site' ); |
|
30 | + $manager = \Aimeos\MShop\Locale\Manager\Factory::createManager($context)->getSubManager('site'); |
|
31 | 31 | $search = $manager->createSearch(); |
32 | 32 | |
33 | - if( ( $codes = (string) $input->getArgument( 'site' ) ) !== '' ) { |
|
34 | - $search->setConditions( $search->compare( '==', 'locale.site.code', explode( ' ', $codes ) ) ); |
|
33 | + if (($codes = (string) $input->getArgument('site')) !== '') { |
|
34 | + $search->setConditions($search->compare('==', 'locale.site.code', explode(' ', $codes))); |
|
35 | 35 | } |
36 | 36 | |
37 | - return $manager->searchItems( $search ); |
|
37 | + return $manager->searchItems($search); |
|
38 | 38 | } |
39 | 39 | } |
@@ -14,13 +14,13 @@ |
||
14 | 14 | $kernel = $this->createKernel(); |
15 | 15 | $kernel->boot(); |
16 | 16 | |
17 | - $application = new Application( $kernel ); |
|
18 | - $application->add( new Command\JobsCommand() ); |
|
17 | + $application = new Application($kernel); |
|
18 | + $application->add(new Command\JobsCommand()); |
|
19 | 19 | |
20 | - $command = $application->find( 'aimeos:jobs' ); |
|
21 | - $commandTester = new CommandTester( $command ); |
|
22 | - $commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest', 'jobs' => 'index/rebuild' ) ); |
|
20 | + $command = $application->find('aimeos:jobs'); |
|
21 | + $commandTester = new CommandTester($command); |
|
22 | + $commandTester->execute(array('command' => $command->getName(), 'site' => 'unittest', 'jobs' => 'index/rebuild')); |
|
23 | 23 | |
24 | - $this->assertEquals( 0, $commandTester->getStatusCode() ); |
|
24 | + $this->assertEquals(0, $commandTester->getStatusCode()); |
|
25 | 25 | } |
26 | 26 | } |
@@ -14,13 +14,13 @@ |
||
14 | 14 | $kernel = $this->createKernel(); |
15 | 15 | $kernel->boot(); |
16 | 16 | |
17 | - $application = new Application( $kernel ); |
|
18 | - $application->add( new Command\CacheCommand() ); |
|
17 | + $application = new Application($kernel); |
|
18 | + $application->add(new Command\CacheCommand()); |
|
19 | 19 | |
20 | - $command = $application->find( 'aimeos:cache' ); |
|
21 | - $commandTester = new CommandTester( $command ); |
|
22 | - $commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest' ) ); |
|
20 | + $command = $application->find('aimeos:cache'); |
|
21 | + $commandTester = new CommandTester($command); |
|
22 | + $commandTester->execute(array('command' => $command->getName(), 'site' => 'unittest')); |
|
23 | 23 | |
24 | - $this->assertEquals( 0, $commandTester->getStatusCode() ); |
|
24 | + $this->assertEquals(0, $commandTester->getStatusCode()); |
|
25 | 25 | } |
26 | 26 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | */ |
210 | 210 | public function getRoles() |
211 | 211 | { |
212 | - return array( 'ROLE_USER' ); |
|
212 | + return array('ROLE_USER'); |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | |
@@ -226,23 +226,23 @@ discard block |
||
226 | 226 | */ |
227 | 227 | public function serialize() |
228 | 228 | { |
229 | - return serialize( array( |
|
229 | + return serialize(array( |
|
230 | 230 | $this->id, |
231 | 231 | $this->username, |
232 | 232 | $this->password, |
233 | - ) ); |
|
233 | + )); |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | |
237 | 237 | /** |
238 | 238 | * @see \Serializable::unserialize() |
239 | 239 | */ |
240 | - public function unserialize( $serialized ) |
|
240 | + public function unserialize($serialized) |
|
241 | 241 | { |
242 | 242 | list ( |
243 | 243 | $this->id, |
244 | 244 | $this->username, |
245 | 245 | $this->password, |
246 | - ) = unserialize( $serialized ); |
|
246 | + ) = unserialize($serialized); |
|
247 | 247 | } |
248 | 248 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | */ |
210 | 210 | public function getSalutation() |
211 | 211 | { |
212 | - return ( isset( $this->salutation ) ? (string) $this->salutation : \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN ); |
|
212 | + return (isset($this->salutation) ? (string) $this->salutation : \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN); |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | */ |
221 | 221 | public function setSalutation($salutation) |
222 | 222 | { |
223 | - switch( $salutation ) |
|
223 | + switch ($salutation) |
|
224 | 224 | { |
225 | 225 | case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN: |
226 | 226 | case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY: |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR: |
230 | 230 | break; |
231 | 231 | default: |
232 | - throw new \Exception( sprintf( 'Address salutation "%1$s" is unknown', $value ) ); |
|
232 | + throw new \Exception(sprintf('Address salutation "%1$s" is unknown', $value)); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | $this->salutation = (string) $salutation; |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | */ |
442 | 442 | public function setCountryId($countryid) |
443 | 443 | { |
444 | - $this->countryid = strtoupper( (string) $countryid ); |
|
444 | + $this->countryid = strtoupper((string) $countryid); |
|
445 | 445 | } |
446 | 446 | |
447 | 447 | |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | */ |
464 | 464 | public function setLanguageId($langid) |
465 | 465 | { |
466 | - $this->langid = strtolower( (string) $langid ); |
|
466 | + $this->langid = strtolower((string) $langid); |
|
467 | 467 | } |
468 | 468 | |
469 | 469 | |
@@ -542,8 +542,8 @@ discard block |
||
542 | 542 | { |
543 | 543 | $pattern = '#^([a-z]+://)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)+(:[0-9]+)?(/.*)?$#'; |
544 | 544 | |
545 | - if( $website !== '' && preg_match( $pattern, $website ) !== 1 ) { |
|
546 | - throw new \Exception( sprintf( 'Invalid web site URL "%1$s"', $website ) ); |
|
545 | + if ($website !== '' && preg_match($pattern, $website) !== 1) { |
|
546 | + throw new \Exception(sprintf('Invalid web site URL "%1$s"', $website)); |
|
547 | 547 | } |
548 | 548 | |
549 | 549 | $this->website = (string) $website; |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * |
30 | 30 | * @param Container $container Container object to access parameters |
31 | 31 | */ |
32 | - public function __construct( Container $container ) |
|
32 | + public function __construct(Container $container) |
|
33 | 33 | { |
34 | 34 | $this->container = $container; |
35 | 35 | } |
@@ -42,10 +42,10 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function get() |
44 | 44 | { |
45 | - if( $this->object === null ) |
|
45 | + if ($this->object === null) |
|
46 | 46 | { |
47 | - $extDirs = (array) $this->container->getParameter( 'aimeos_shop.extdir' ); |
|
48 | - $this->object = new \Aimeos\Bootstrap( $extDirs, false ); |
|
47 | + $extDirs = (array) $this->container->getParameter('aimeos_shop.extdir'); |
|
48 | + $this->object = new \Aimeos\Bootstrap($extDirs, false); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return $this->object; |
@@ -59,14 +59,14 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function getVersion() |
61 | 61 | { |
62 | - $filename = dirname( $this->container->get( 'kernel' )->getRootDir() ) . DIRECTORY_SEPARATOR . 'composer.lock'; |
|
62 | + $filename = dirname($this->container->get('kernel')->getRootDir()).DIRECTORY_SEPARATOR.'composer.lock'; |
|
63 | 63 | |
64 | - if( file_exists( $filename ) === true && ( $content = file_get_contents( $filename ) ) !== false |
|
65 | - && ( $content = json_decode( $content, true ) ) !== null && isset( $content['packages'] ) |
|
64 | + if (file_exists($filename) === true && ($content = file_get_contents($filename)) !== false |
|
65 | + && ($content = json_decode($content, true)) !== null && isset($content['packages']) |
|
66 | 66 | ) { |
67 | - foreach( (array) $content['packages'] as $item ) |
|
67 | + foreach ((array) $content['packages'] as $item) |
|
68 | 68 | { |
69 | - if( $item['name'] === 'aimeos/aimeos-symfony' ) { |
|
69 | + if ($item['name'] === 'aimeos/aimeos-symfony') { |
|
70 | 70 | return $item['version']; |
71 | 71 | } |
72 | 72 | } |