| @@ -17,144 +17,144 @@ | ||
| 17 | 17 | |
| 18 | 18 | public function testGetId() | 
| 19 | 19 |  	{ | 
| 20 | - $this->assertEquals( null, $this->object->getId() ); | |
| 20 | + $this->assertEquals(null, $this->object->getId()); | |
| 21 | 21 | } | 
| 22 | 22 | |
| 23 | 23 | |
| 24 | 24 | public function testGetSetCompany() | 
| 25 | 25 |  	{ | 
| 26 | - $this->object->setCompany( 'ABC' ); | |
| 27 | - $this->assertEquals( 'ABC', $this->object->getCompany() ); | |
| 26 | +		$this->object->setCompany('ABC'); | |
| 27 | +		$this->assertEquals('ABC', $this->object->getCompany()); | |
| 28 | 28 | } | 
| 29 | 29 | |
| 30 | 30 | |
| 31 | 31 | public function testGetSetVatID() | 
| 32 | 32 |  	{ | 
| 33 | - $this->object->setVatID( 'AT0000' ); | |
| 34 | - $this->assertEquals( 'AT0000', $this->object->getVatID() ); | |
| 33 | +		$this->object->setVatID('AT0000'); | |
| 34 | +		$this->assertEquals('AT0000', $this->object->getVatID()); | |
| 35 | 35 | } | 
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | public function testGetSetSalutation() | 
| 39 | 39 |  	{ | 
| 40 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN ); | |
| 41 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN, $this->object->getSalutation() ); | |
| 40 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN); | |
| 41 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN, $this->object->getSalutation()); | |
| 42 | 42 | |
| 43 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY ); | |
| 44 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY, $this->object->getSalutation() ); | |
| 43 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY); | |
| 44 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY, $this->object->getSalutation()); | |
| 45 | 45 | |
| 46 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS ); | |
| 47 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS, $this->object->getSalutation() ); | |
| 46 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS); | |
| 47 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS, $this->object->getSalutation()); | |
| 48 | 48 | |
| 49 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS ); | |
| 50 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS, $this->object->getSalutation() ); | |
| 49 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS); | |
| 50 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS, $this->object->getSalutation()); | |
| 51 | 51 | |
| 52 | - $this->object->setSalutation( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR ); | |
| 53 | - $this->assertEquals( \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR, $this->object->getSalutation() ); | |
| 52 | + $this->object->setSalutation(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR); | |
| 53 | + $this->assertEquals(\Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR, $this->object->getSalutation()); | |
| 54 | 54 | } | 
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | public function testGetSetTitle() | 
| 58 | 58 |  	{ | 
| 59 | - $this->object->setTitle( 'Prof. Dr.' ); | |
| 60 | - $this->assertEquals( 'Prof. Dr.', $this->object->getTitle() ); | |
| 59 | +		$this->object->setTitle('Prof. Dr.'); | |
| 60 | +		$this->assertEquals('Prof. Dr.', $this->object->getTitle()); | |
| 61 | 61 | } | 
| 62 | 62 | |
| 63 | 63 | |
| 64 | 64 | public function testGetSetFirstname() | 
| 65 | 65 |  	{ | 
| 66 | - $this->object->setFirstname( 'first' ); | |
| 67 | - $this->assertEquals( 'first', $this->object->getFirstname() ); | |
| 66 | +		$this->object->setFirstname('first'); | |
| 67 | +		$this->assertEquals('first', $this->object->getFirstname()); | |
| 68 | 68 | } | 
| 69 | 69 | |
| 70 | 70 | |
| 71 | 71 | public function testGetSetLastname() | 
| 72 | 72 |  	{ | 
| 73 | - $this->object->setLastname( 'last' ); | |
| 74 | - $this->assertEquals( 'last', $this->object->getLastname() ); | |
| 73 | +		$this->object->setLastname('last'); | |
| 74 | +		$this->assertEquals('last', $this->object->getLastname()); | |
| 75 | 75 | } | 
| 76 | 76 | |
| 77 | 77 | |
| 78 | 78 | public function testGetSetAddress1() | 
| 79 | 79 |  	{ | 
| 80 | - $this->object->setAddress1( 'test street' ); | |
| 81 | - $this->assertEquals( 'test street', $this->object->getAddress1() ); | |
| 80 | +		$this->object->setAddress1('test street'); | |
| 81 | +		$this->assertEquals('test street', $this->object->getAddress1()); | |
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | 84 | |
| 85 | 85 | public function testGetSetAddress2() | 
| 86 | 86 |  	{ | 
| 87 | - $this->object->setAddress2( '1' ); | |
| 88 | - $this->assertEquals( '1', $this->object->getAddress2() ); | |
| 87 | +		$this->object->setAddress2('1'); | |
| 88 | +		$this->assertEquals('1', $this->object->getAddress2()); | |
| 89 | 89 | } | 
| 90 | 90 | |
| 91 | 91 | |
| 92 | 92 | public function testGetSetAddress3() | 
| 93 | 93 |  	{ | 
| 94 | - $this->object->setAddress3( 'EG' ); | |
| 95 | - $this->assertEquals( 'EG', $this->object->getAddress3() ); | |
| 94 | +		$this->object->setAddress3('EG'); | |
| 95 | +		$this->assertEquals('EG', $this->object->getAddress3()); | |
| 96 | 96 | } | 
| 97 | 97 | |
| 98 | 98 | |
| 99 | 99 | public function testGetSetPostal() | 
| 100 | 100 |  	{ | 
| 101 | - $this->object->setPostal( '12345' ); | |
| 102 | - $this->assertEquals( '12345', $this->object->getPostal() ); | |
| 101 | +		$this->object->setPostal('12345'); | |
| 102 | +		$this->assertEquals('12345', $this->object->getPostal()); | |
| 103 | 103 | } | 
| 104 | 104 | |
| 105 | 105 | |
| 106 | 106 | public function testGetSetCity() | 
| 107 | 107 |  	{ | 
| 108 | - $this->object->setCity( 'Munich' ); | |
| 109 | - $this->assertEquals( 'Munich', $this->object->getCity() ); | |
| 108 | +		$this->object->setCity('Munich'); | |
| 109 | +		$this->assertEquals('Munich', $this->object->getCity()); | |
| 110 | 110 | } | 
| 111 | 111 | |
| 112 | 112 | |
| 113 | 113 | public function testGetSetState() | 
| 114 | 114 |  	{ | 
| 115 | - $this->object->setState( 'Bayern' ); | |
| 116 | - $this->assertEquals( 'Bayern', $this->object->getState() ); | |
| 115 | +		$this->object->setState('Bayern'); | |
| 116 | +		$this->assertEquals('Bayern', $this->object->getState()); | |
| 117 | 117 | } | 
| 118 | 118 | |
| 119 | 119 | |
| 120 | 120 | public function testGetSetCountryId() | 
| 121 | 121 |  	{ | 
| 122 | - $this->object->setCountryId( 'DE' ); | |
| 123 | - $this->assertEquals( 'DE', $this->object->getCountryId() ); | |
| 122 | +		$this->object->setCountryId('DE'); | |
| 123 | +		$this->assertEquals('DE', $this->object->getCountryId()); | |
| 124 | 124 | } | 
| 125 | 125 | |
| 126 | 126 | |
| 127 | 127 | public function testGetSetLanguageId() | 
| 128 | 128 |  	{ | 
| 129 | - $this->object->setLanguageId( 'de' ); | |
| 130 | - $this->assertEquals( 'de', $this->object->getLanguageId() ); | |
| 129 | +		$this->object->setLanguageId('de'); | |
| 130 | +		$this->assertEquals('de', $this->object->getLanguageId()); | |
| 131 | 131 | } | 
| 132 | 132 | |
| 133 | 133 | |
| 134 | 134 | public function testGetSetTelephone() | 
| 135 | 135 |  	{ | 
| 136 | - $this->object->setTelephone( '089123456789' ); | |
| 137 | - $this->assertEquals( '089123456789', $this->object->getTelephone() ); | |
| 136 | +		$this->object->setTelephone('089123456789'); | |
| 137 | +		$this->assertEquals('089123456789', $this->object->getTelephone()); | |
| 138 | 138 | } | 
| 139 | 139 | |
| 140 | 140 | |
| 141 | 141 | public function testGetSetTelefax() | 
| 142 | 142 |  	{ | 
| 143 | - $this->object->setTelefax( '089987654321' ); | |
| 144 | - $this->assertEquals( '089987654321', $this->object->getTelefax() ); | |
| 143 | +		$this->object->setTelefax('089987654321'); | |
| 144 | +		$this->assertEquals('089987654321', $this->object->getTelefax()); | |
| 145 | 145 | } | 
| 146 | 146 | |
| 147 | 147 | |
| 148 | 148 | public function testGetSetWebsite() | 
| 149 | 149 |  	{ | 
| 150 | - $this->object->setWebsite( 'http://aimeos.org' ); | |
| 151 | - $this->assertEquals( 'http://aimeos.org', $this->object->getWebsite() ); | |
| 150 | +		$this->object->setWebsite('http://aimeos.org'); | |
| 151 | +		$this->assertEquals('http://aimeos.org', $this->object->getWebsite()); | |
| 152 | 152 | } | 
| 153 | 153 | |
| 154 | 154 | |
| 155 | 155 | public function testSetWebsiteInvalid() | 
| 156 | 156 |  	{ | 
| 157 | - $this->setExpectedException( 'Exception' ); | |
| 158 | - $this->object->setWebsite( 'aimeos+org' ); | |
| 157 | +		$this->setExpectedException('Exception'); | |
| 158 | +		$this->object->setWebsite('aimeos+org'); | |
| 159 | 159 | } | 
| 160 | 160 | } | 
| @@ -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; |