| @@ -52,7 +52,7 @@ discard block | ||
| 52 | 52 | * @param string $path Path to the directory | 
| 53 | 53 | * @return void | 
| 54 | 54 | * @throws \Aimeos\MW\Filesystem\Exception If an error occurs | 
| 55 | - */ | |
| 55 | + */ | |
| 56 | 56 | public function mkdir( $path ) | 
| 57 | 57 |  	{ | 
| 58 | 58 |  		try { | 
| @@ -69,7 +69,7 @@ discard block | ||
| 69 | 69 | * @param string $path Path to the directory | 
| 70 | 70 | * @return void | 
| 71 | 71 | * @throws \Aimeos\MW\Filesystem\Exception If an error occurs | 
| 72 | - */ | |
| 72 | + */ | |
| 73 | 73 | public function rmdir( $path ) | 
| 74 | 74 |  	{ | 
| 75 | 75 |  		try { | 
| @@ -8,7 +8,7 @@ discard block | ||
| 8 | 8 | |
| 9 | 9 | return array( | 
| 10 | 10 | 'table' => array( | 
| 11 | -		'users' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 11 | +		'users' => function( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 12 | 12 | |
| 13 | 13 | $table = $schema->createTable( 'users' ); | 
| 14 | 14 | |
| @@ -44,7 +44,7 @@ discard block | ||
| 44 | 44 | $table->addColumn( 'status', 'smallint', array( 'default' => 1 ) ); | 
| 45 | 45 | $table->addColumn( 'updated_at', 'datetime', [] ); | 
| 46 | 46 | $table->addColumn( 'created_at', 'datetime', [] ); | 
| 47 | -			$table->addColumn( 'editor', 'string', array('length' => 255, 'default' => '' ) ); | |
| 47 | + $table->addColumn( 'editor', 'string', array( 'length' => 255, 'default' => '' ) ); | |
| 48 | 48 | |
| 49 | 49 | $table->setPrimaryKey( array( 'id' ), 'pk_lvusr_id' ); | 
| 50 | 50 | $table->addUniqueIndex( array( 'email' ), 'unq_lvusr_email' ); | 
| @@ -59,7 +59,7 @@ discard block | ||
| 59 | 59 | return $schema; | 
| 60 | 60 | }, | 
| 61 | 61 | |
| 62 | -		'users_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 62 | +		'users_address' => function( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 63 | 63 | |
| 64 | 64 | $table = $schema->createTable( 'users_address' ); | 
| 65 | 65 | |
| @@ -89,7 +89,7 @@ discard block | ||
| 89 | 89 | $table->addColumn( 'latitude', 'float', array( 'notnull' => false ) ); | 
| 90 | 90 | $table->addColumn( 'mtime', 'datetime', [] ); | 
| 91 | 91 | $table->addColumn( 'ctime', 'datetime', [] ); | 
| 92 | -			$table->addColumn( 'editor', 'string', array('length' => 255 ) ); | |
| 92 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); | |
| 93 | 93 | |
| 94 | 94 | $table->setPrimaryKey( array( 'id' ), 'pk_lvuad_id' ); | 
| 95 | 95 | $table->addIndex( array( 'parentid' ), 'idx_lvuad_pid' ); | 
| @@ -106,7 +106,7 @@ discard block | ||
| 106 | 106 | return $schema; | 
| 107 | 107 | }, | 
| 108 | 108 | |
| 109 | -		'users_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 109 | +		'users_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 110 | 110 | |
| 111 | 111 | $table = $schema->createTable( 'users_list_type' ); | 
| 112 | 112 | |
| @@ -130,7 +130,7 @@ discard block | ||
| 130 | 130 | return $schema; | 
| 131 | 131 | }, | 
| 132 | 132 | |
| 133 | -		'users_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 133 | +		'users_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 134 | 134 | |
| 135 | 135 | $table = $schema->createTable( 'users_list' ); | 
| 136 | 136 | |
| @@ -159,7 +159,7 @@ discard block | ||
| 159 | 159 | return $schema; | 
| 160 | 160 | }, | 
| 161 | 161 | |
| 162 | -		'users_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 162 | +		'users_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 163 | 163 | |
| 164 | 164 | $table = $schema->createTable( 'users_property_type' ); | 
| 165 | 165 | |
| @@ -183,7 +183,7 @@ discard block | ||
| 183 | 183 | return $schema; | 
| 184 | 184 | }, | 
| 185 | 185 | |
| 186 | -		'users_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 186 | +		'users_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 187 | 187 | |
| 188 | 188 | $table = $schema->createTable( 'users_property' ); | 
| 189 | 189 | |
| @@ -45,10 +45,10 @@ discard block | ||
| 45 | 45 | public function testGetItem() | 
| 46 | 46 |  	{ | 
| 47 | 47 | $search = $this->object->createSearch(); | 
| 48 | - $search->setSlice(0, 1); | |
| 49 | - $results = $this->object->searchItems($search); | |
| 48 | + $search->setSlice( 0, 1 ); | |
| 49 | + $results = $this->object->searchItems( $search ); | |
| 50 | 50 | |
| 51 | -		if( ( $expected = reset($results) ) === false ) { | |
| 51 | +		if( ( $expected = reset( $results ) ) === false ) { | |
| 52 | 52 | throw new \RuntimeException( 'No list type item found' ); | 
| 53 | 53 | } | 
| 54 | 54 | |
| @@ -66,14 +66,14 @@ discard block | ||
| 66 | 66 | public function testSaveUpdateDeleteItem() | 
| 67 | 67 |  	{ | 
| 68 | 68 | $search = $this->object->createSearch(); | 
| 69 | - $search->setSlice(0, 1); | |
| 70 | - $results = $this->object->searchItems($search); | |
| 69 | + $search->setSlice( 0, 1 ); | |
| 70 | + $results = $this->object->searchItems( $search ); | |
| 71 | 71 | |
| 72 | -		if( ( $item = reset($results) ) === false ) { | |
| 72 | +		if( ( $item = reset( $results ) ) === false ) { | |
| 73 | 73 | throw new \RuntimeException( 'No type item found' ); | 
| 74 | 74 | } | 
| 75 | 75 | |
| 76 | - $item->setId(null); | |
| 76 | + $item->setId( null ); | |
| 77 | 77 | $item->setCode( 'unitTestInit' ); | 
| 78 | 78 | $resultSaved = $this->object->saveItem( $item ); | 
| 79 | 79 | $itemSaved = $this->object->getItem( $item->getId() ); | 
| @@ -112,7 +112,7 @@ discard block | ||
| 112 | 112 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved ); | 
| 113 | 113 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd ); | 
| 114 | 114 | |
| 115 | -		$this->setExpectedException('\\Aimeos\\MShop\\Exception'); | |
| 115 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); | |
| 116 | 116 | $this->object->getItem( $itemSaved->getId() ); | 
| 117 | 117 | } | 
| 118 | 118 | |
| @@ -135,13 +135,13 @@ discard block | ||
| 135 | 135 | $expr[] = $search->compare( '==', 'customer.lists.type.editor', $this->editor ); | 
| 136 | 136 | |
| 137 | 137 | $search->setConditions( $search->combine( '&&', $expr ) ); | 
| 138 | - $search->setSlice(0, 1); | |
| 138 | + $search->setSlice( 0, 1 ); | |
| 139 | 139 | |
| 140 | 140 | $results = $this->object->searchItems( $search, [], $total ); | 
| 141 | 141 | $this->assertEquals( 1, count( $results ) ); | 
| 142 | 142 | $this->assertEquals( 1, $total ); | 
| 143 | 143 | |
| 144 | -		foreach($results as $itemId => $item) { | |
| 144 | +		foreach( $results as $itemId => $item ) { | |
| 145 | 145 | $this->assertEquals( $itemId, $item->getId() ); | 
| 146 | 146 | } | 
| 147 | 147 | } | 
| @@ -126,56 +126,56 @@ discard block | ||
| 126 | 126 | |
| 127 | 127 | $this->assertTrue( $item->getId() !== null ); | 
| 128 | 128 | $this->assertEquals( $item->getId(), $itemSaved->getId() ); | 
| 129 | - $this->assertEquals( $item->getParentId(), $itemSaved->getParentId()); | |
| 130 | - $this->assertEquals( $item->getPosition(), $itemSaved->getPosition()); | |
| 131 | - $this->assertEquals( $item->getCompany(), $itemSaved->getCompany()); | |
| 132 | - $this->assertEquals( $item->getVatID(), $itemSaved->getVatID()); | |
| 133 | - $this->assertEquals( $item->getSalutation(), $itemSaved->getSalutation()); | |
| 134 | - $this->assertEquals( $item->getTitle(), $itemSaved->getTitle()); | |
| 135 | - $this->assertEquals( $item->getFirstname(), $itemSaved->getFirstname()); | |
| 136 | - $this->assertEquals( $item->getLastname(), $itemSaved->getLastname()); | |
| 137 | - $this->assertEquals( $item->getAddress1(), $itemSaved->getAddress1()); | |
| 138 | - $this->assertEquals( $item->getAddress2(), $itemSaved->getAddress2()); | |
| 139 | - $this->assertEquals( $item->getAddress3(), $itemSaved->getAddress3()); | |
| 140 | - $this->assertEquals( $item->getPostal(), $itemSaved->getPostal()); | |
| 141 | - $this->assertEquals( $item->getCity(), $itemSaved->getCity()); | |
| 142 | - $this->assertEquals( $item->getState(), $itemSaved->getState()); | |
| 143 | - $this->assertEquals( $item->getCountryId(), $itemSaved->getCountryId()); | |
| 144 | - $this->assertEquals( $item->getLanguageId(), $itemSaved->getLanguageId()); | |
| 145 | - $this->assertEquals( $item->getTelephone(), $itemSaved->getTelephone()); | |
| 146 | - $this->assertEquals( $item->getEmail(), $itemSaved->getEmail()); | |
| 147 | - $this->assertEquals( $item->getTelefax(), $itemSaved->getTelefax()); | |
| 148 | - $this->assertEquals( $item->getWebsite(), $itemSaved->getWebsite()); | |
| 149 | - $this->assertEquals( $item->getLongitude(), $itemSaved->getLongitude()); | |
| 150 | - $this->assertEquals( $item->getLatitude(), $itemSaved->getLatitude()); | |
| 129 | + $this->assertEquals( $item->getParentId(), $itemSaved->getParentId() ); | |
| 130 | + $this->assertEquals( $item->getPosition(), $itemSaved->getPosition() ); | |
| 131 | + $this->assertEquals( $item->getCompany(), $itemSaved->getCompany() ); | |
| 132 | + $this->assertEquals( $item->getVatID(), $itemSaved->getVatID() ); | |
| 133 | + $this->assertEquals( $item->getSalutation(), $itemSaved->getSalutation() ); | |
| 134 | + $this->assertEquals( $item->getTitle(), $itemSaved->getTitle() ); | |
| 135 | + $this->assertEquals( $item->getFirstname(), $itemSaved->getFirstname() ); | |
| 136 | + $this->assertEquals( $item->getLastname(), $itemSaved->getLastname() ); | |
| 137 | + $this->assertEquals( $item->getAddress1(), $itemSaved->getAddress1() ); | |
| 138 | + $this->assertEquals( $item->getAddress2(), $itemSaved->getAddress2() ); | |
| 139 | + $this->assertEquals( $item->getAddress3(), $itemSaved->getAddress3() ); | |
| 140 | + $this->assertEquals( $item->getPostal(), $itemSaved->getPostal() ); | |
| 141 | + $this->assertEquals( $item->getCity(), $itemSaved->getCity() ); | |
| 142 | + $this->assertEquals( $item->getState(), $itemSaved->getState() ); | |
| 143 | + $this->assertEquals( $item->getCountryId(), $itemSaved->getCountryId() ); | |
| 144 | + $this->assertEquals( $item->getLanguageId(), $itemSaved->getLanguageId() ); | |
| 145 | + $this->assertEquals( $item->getTelephone(), $itemSaved->getTelephone() ); | |
| 146 | + $this->assertEquals( $item->getEmail(), $itemSaved->getEmail() ); | |
| 147 | + $this->assertEquals( $item->getTelefax(), $itemSaved->getTelefax() ); | |
| 148 | + $this->assertEquals( $item->getWebsite(), $itemSaved->getWebsite() ); | |
| 149 | + $this->assertEquals( $item->getLongitude(), $itemSaved->getLongitude() ); | |
| 150 | + $this->assertEquals( $item->getLatitude(), $itemSaved->getLatitude() ); | |
| 151 | 151 | |
| 152 | 152 | $this->assertEquals( $this->editor, $itemSaved->getEditor() ); | 
| 153 | 153 |  		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() ); | 
| 154 | -		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified()); | |
| 154 | +		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() ); | |
| 155 | 155 | |
| 156 | 156 | $this->assertEquals( $itemExp->getId(), $itemUpd->getId() ); | 
| 157 | - $this->assertEquals( $itemExp->getParentId(), $itemUpd->getParentId()); | |
| 158 | - $this->assertEquals( $itemExp->getPosition(), $itemUpd->getPosition()); | |
| 159 | - $this->assertEquals( $itemExp->getCompany(), $itemUpd->getCompany()); | |
| 160 | - $this->assertEquals( $itemExp->getVatID(), $itemUpd->getVatID()); | |
| 161 | - $this->assertEquals( $itemExp->getSalutation(), $itemUpd->getSalutation()); | |
| 162 | - $this->assertEquals( $itemExp->getTitle(), $itemUpd->getTitle()); | |
| 163 | - $this->assertEquals( $itemExp->getFirstname(), $itemUpd->getFirstname()); | |
| 164 | - $this->assertEquals( $itemExp->getLastname(), $itemUpd->getLastname()); | |
| 165 | - $this->assertEquals( $itemExp->getAddress1(), $itemUpd->getAddress1()); | |
| 166 | - $this->assertEquals( $itemExp->getAddress2(), $itemUpd->getAddress2()); | |
| 167 | - $this->assertEquals( $itemExp->getAddress3(), $itemUpd->getAddress3()); | |
| 168 | - $this->assertEquals( $itemExp->getPostal(), $itemUpd->getPostal()); | |
| 169 | - $this->assertEquals( $itemExp->getCity(), $itemUpd->getCity()); | |
| 170 | - $this->assertEquals( $itemExp->getState(), $itemUpd->getState()); | |
| 171 | - $this->assertEquals( $itemExp->getCountryId(), $itemUpd->getCountryId()); | |
| 172 | - $this->assertEquals( $itemExp->getLanguageId(), $itemUpd->getLanguageId()); | |
| 173 | - $this->assertEquals( $itemExp->getTelephone(), $itemUpd->getTelephone()); | |
| 174 | - $this->assertEquals( $itemExp->getEmail(), $itemUpd->getEmail()); | |
| 175 | - $this->assertEquals( $itemExp->getTelefax(), $itemUpd->getTelefax()); | |
| 176 | - $this->assertEquals( $itemExp->getWebsite(), $itemUpd->getWebsite()); | |
| 177 | - $this->assertEquals( $itemExp->getLongitude(), $itemUpd->getLongitude()); | |
| 178 | - $this->assertEquals( $itemExp->getLatitude(), $itemUpd->getLatitude()); | |
| 157 | + $this->assertEquals( $itemExp->getParentId(), $itemUpd->getParentId() ); | |
| 158 | + $this->assertEquals( $itemExp->getPosition(), $itemUpd->getPosition() ); | |
| 159 | + $this->assertEquals( $itemExp->getCompany(), $itemUpd->getCompany() ); | |
| 160 | + $this->assertEquals( $itemExp->getVatID(), $itemUpd->getVatID() ); | |
| 161 | + $this->assertEquals( $itemExp->getSalutation(), $itemUpd->getSalutation() ); | |
| 162 | + $this->assertEquals( $itemExp->getTitle(), $itemUpd->getTitle() ); | |
| 163 | + $this->assertEquals( $itemExp->getFirstname(), $itemUpd->getFirstname() ); | |
| 164 | + $this->assertEquals( $itemExp->getLastname(), $itemUpd->getLastname() ); | |
| 165 | + $this->assertEquals( $itemExp->getAddress1(), $itemUpd->getAddress1() ); | |
| 166 | + $this->assertEquals( $itemExp->getAddress2(), $itemUpd->getAddress2() ); | |
| 167 | + $this->assertEquals( $itemExp->getAddress3(), $itemUpd->getAddress3() ); | |
| 168 | + $this->assertEquals( $itemExp->getPostal(), $itemUpd->getPostal() ); | |
| 169 | + $this->assertEquals( $itemExp->getCity(), $itemUpd->getCity() ); | |
| 170 | + $this->assertEquals( $itemExp->getState(), $itemUpd->getState() ); | |
| 171 | + $this->assertEquals( $itemExp->getCountryId(), $itemUpd->getCountryId() ); | |
| 172 | + $this->assertEquals( $itemExp->getLanguageId(), $itemUpd->getLanguageId() ); | |
| 173 | + $this->assertEquals( $itemExp->getTelephone(), $itemUpd->getTelephone() ); | |
| 174 | + $this->assertEquals( $itemExp->getEmail(), $itemUpd->getEmail() ); | |
| 175 | + $this->assertEquals( $itemExp->getTelefax(), $itemUpd->getTelefax() ); | |
| 176 | + $this->assertEquals( $itemExp->getWebsite(), $itemUpd->getWebsite() ); | |
| 177 | + $this->assertEquals( $itemExp->getLongitude(), $itemUpd->getLongitude() ); | |
| 178 | + $this->assertEquals( $itemExp->getLatitude(), $itemUpd->getLatitude() ); | |
| 179 | 179 | |
| 180 | 180 | $this->assertEquals( $this->editor, $itemUpd->getEditor() ); | 
| 181 | 181 | $this->assertEquals( $itemExp->getTimeCreated(), $itemUpd->getTimeCreated() ); | 
| @@ -184,7 +184,7 @@ discard block | ||
| 184 | 184 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved ); | 
| 185 | 185 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd ); | 
| 186 | 186 | |
| 187 | -		$this->setExpectedException('\\Aimeos\\MShop\\Exception'); | |
| 187 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); | |
| 188 | 188 | $this->object->getItem( $itemSaved->getId() ); | 
| 189 | 189 | } | 
| 190 | 190 | |
| @@ -57,11 +57,11 @@ discard block | ||
| 57 | 57 | $search->setConditions( $search->compare( '==', 'customer.property.editor', $this->editor ) ); | 
| 58 | 58 | $results = $this->object->searchItems( $search ); | 
| 59 | 59 | |
| 60 | -		if( ( $item = reset($results) ) === false ) { | |
| 60 | +		if( ( $item = reset( $results ) ) === false ) { | |
| 61 | 61 | throw new \RuntimeException( 'No property item found' ); | 
| 62 | 62 | } | 
| 63 | 63 | |
| 64 | - $item->setId(null); | |
| 64 | + $item->setId( null ); | |
| 65 | 65 | $item->setLanguageId( 'en' ); | 
| 66 | 66 | $resultSaved = $this->object->saveItem( $item ); | 
| 67 | 67 | $itemSaved = $this->object->getItem( $item->getId() ); | 
| @@ -110,13 +110,13 @@ discard block | ||
| 110 | 110 |  	{ | 
| 111 | 111 | $search = $this->object->createSearch(); | 
| 112 | 112 | $conditions = array( | 
| 113 | - $search->compare( '~=', 'customer.property.value', '1'), | |
| 113 | + $search->compare( '~=', 'customer.property.value', '1' ), | |
| 114 | 114 | $search->compare( '==', 'customer.property.editor', $this->editor ) | 
| 115 | 115 | ); | 
| 116 | 116 | $search->setConditions( $search->combine( '&&', $conditions ) ); | 
| 117 | 117 | $results = $this->object->searchItems( $search ); | 
| 118 | 118 | |
| 119 | -		if( ($expected = reset($results)) === false ) { | |
| 119 | +		if( ( $expected = reset( $results ) ) === false ) { | |
| 120 | 120 | throw new \RuntimeException( sprintf( 'No customer property item found for value "%1$s".', '1' ) ); | 
| 121 | 121 | } | 
| 122 | 122 | |
| @@ -155,7 +155,7 @@ discard block | ||
| 155 | 155 | $expr[] = $search->compare( '==', 'customer.property.value', '1' ); | 
| 156 | 156 | $expr[] = $search->compare( '==', 'customer.property.editor', $this->editor ); | 
| 157 | 157 | |
| 158 | -		$search->setConditions( $search->combine('&&', $expr) ); | |
| 158 | + $search->setConditions( $search->combine( '&&', $expr ) ); | |
| 159 | 159 | $results = $this->object->searchItems( $search, [], $total ); | 
| 160 | 160 | $this->assertEquals( 1, count( $results ) ); | 
| 161 | 161 | } | 
| @@ -163,17 +163,17 @@ discard block | ||
| 163 | 163 | |
| 164 | 164 | public function testGetSubManager() | 
| 165 | 165 |  	{ | 
| 166 | -		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') ); | |
| 167 | -		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard') ); | |
| 166 | + $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type' ) ); | |
| 167 | + $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type', 'Standard' ) ); | |
| 168 | 168 | |
| 169 | -		$this->setExpectedException('\\Aimeos\\MShop\\Exception'); | |
| 170 | -		$this->object->getSubManager('unknown'); | |
| 169 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); | |
| 170 | + $this->object->getSubManager( 'unknown' ); | |
| 171 | 171 | } | 
| 172 | 172 | |
| 173 | 173 | |
| 174 | 174 | public function testGetSubManagerInvalidName() | 
| 175 | 175 |  	{ | 
| 176 | -		$this->setExpectedException('\\Aimeos\\MShop\\Exception'); | |
| 177 | -		$this->object->getSubManager('type', 'unknown'); | |
| 176 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); | |
| 177 | + $this->object->getSubManager( 'type', 'unknown' ); | |
| 178 | 178 | } | 
| 179 | 179 | } | 
| @@ -27,7 +27,7 @@ discard block | ||
| 27 | 27 | |
| 28 | 28 | protected function tearDown() | 
| 29 | 29 |  	{ | 
| 30 | - unset($this->object); | |
| 30 | + unset( $this->object ); | |
| 31 | 31 | } | 
| 32 | 32 | |
| 33 | 33 | |
| @@ -70,7 +70,7 @@ discard block | ||
| 70 | 70 | |
| 71 | 71 | $results = $this->object->searchItems( $search ); | 
| 72 | 72 | |
| 73 | - if( ($expected = reset($results) ) === false ) | |
| 73 | + if( ( $expected = reset( $results ) ) === false ) | |
| 74 | 74 |  		{ | 
| 75 | 75 | throw new \RuntimeException( 'No property type item found.' ); | 
| 76 | 76 | } | 
| @@ -92,13 +92,13 @@ discard block | ||
| 92 | 92 |  	{ | 
| 93 | 93 | $search = $this->object->createSearch(); | 
| 94 | 94 | $search->setConditions( $search->compare( '==', 'customer.property.type.editor', $this->editor ) ); | 
| 95 | - $results = $this->object->searchItems($search); | |
| 95 | + $results = $this->object->searchItems( $search ); | |
| 96 | 96 | |
| 97 | -		if( ( $item = reset($results) ) === false ) { | |
| 97 | +		if( ( $item = reset( $results ) ) === false ) { | |
| 98 | 98 | throw new \RuntimeException( 'No type item found' ); | 
| 99 | 99 | } | 
| 100 | 100 | |
| 101 | - $item->setId(null); | |
| 101 | + $item->setId( null ); | |
| 102 | 102 | $item->setCode( 'unitTestSave' ); | 
| 103 | 103 | $resultSaved = $this->object->saveItem( $item ); | 
| 104 | 104 | $itemSaved = $this->object->getItem( $item->getId() ); | 
| @@ -159,24 +159,24 @@ discard block | ||
| 159 | 159 | $expr[] = $search->compare( '>=', 'customer.property.type.ctime', '1970-01-01 00:00:00' ); | 
| 160 | 160 | $expr[] = $search->compare( '==', 'customer.property.type.editor', $this->editor ); | 
| 161 | 161 | |
| 162 | -		$search->setConditions( $search->combine('&&', $expr) ); | |
| 162 | + $search->setConditions( $search->combine( '&&', $expr ) ); | |
| 163 | 163 | $results = $this->object->searchItems( $search, [], $total ); | 
| 164 | 164 | $this->assertEquals( 1, count( $results ) ); | 
| 165 | 165 | |
| 166 | 166 | |
| 167 | 167 | $search = $this->object->createSearch(); | 
| 168 | 168 | $conditions = array( | 
| 169 | - $search->compare( '=~', 'customer.property.type.code', 'newsletter'), | |
| 169 | + $search->compare( '=~', 'customer.property.type.code', 'newsletter' ), | |
| 170 | 170 | $search->compare( '==', 'customer.property.type.editor', $this->editor ) | 
| 171 | 171 | ); | 
| 172 | -		$search->setConditions( $search->combine('&&', $conditions ) ); | |
| 173 | - $search->setSlice(0, 1); | |
| 174 | - $items = $this->object->searchItems( $search, [], $total); | |
| 172 | + $search->setConditions( $search->combine( '&&', $conditions ) ); | |
| 173 | + $search->setSlice( 0, 1 ); | |
| 174 | + $items = $this->object->searchItems( $search, [], $total ); | |
| 175 | 175 | |
| 176 | 176 | $this->assertEquals( 1, count( $items ) ); | 
| 177 | 177 | $this->assertEquals( 1, $total ); | 
| 178 | 178 | |
| 179 | -		foreach($items as $itemId => $item) { | |
| 179 | +		foreach( $items as $itemId => $item ) { | |
| 180 | 180 | $this->assertEquals( $itemId, $item->getId() ); | 
| 181 | 181 | } | 
| 182 | 182 | } | 
| @@ -184,7 +184,7 @@ discard block | ||
| 184 | 184 | |
| 185 | 185 | public function testGetSubManager() | 
| 186 | 186 |  	{ | 
| 187 | -		$this->setExpectedException('\\Aimeos\\MShop\\Exception'); | |
| 188 | -		$this->object->getSubManager('unknown'); | |
| 187 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); | |
| 188 | + $this->object->getSubManager( 'unknown' ); | |
| 189 | 189 | } | 
| 190 | 190 | } | 
| @@ -36,7 +36,7 @@ discard block | ||
| 36 | 36 | public function testTransform() | 
| 37 | 37 |  	{ | 
| 38 | 38 | $this->mock->expects( $this->once() )->method( 'route' ) | 
| 39 | - ->with( $this->equalTo( 'route'), $this->equalTo( array( 'key' => 'value' ) ), $this->equalTo( false ) ); | |
| 39 | + ->with( $this->equalTo( 'route' ), $this->equalTo( array( 'key' => 'value' ) ), $this->equalTo( false ) ); | |
| 40 | 40 | |
| 41 | 41 | $this->object->transform( 'route', 'catalog', 'lists', array( 'key' => 'value' ) ); | 
| 42 | 42 | } | 
| @@ -45,7 +45,7 @@ discard block | ||
| 45 | 45 | public function testTransformAbsolute() | 
| 46 | 46 |  	{ | 
| 47 | 47 | $this->mock->expects( $this->once() )->method( 'route' ) | 
| 48 | - ->with( $this->equalTo( 'route'), $this->equalTo( [] ), $this->equalTo( true ) ); | |
| 48 | + ->with( $this->equalTo( 'route' ), $this->equalTo( [] ), $this->equalTo( true ) ); | |
| 49 | 49 | |
| 50 | 50 | $options = array( 'absoluteUri' => true ); | 
| 51 | 51 | $this->object->transform( 'route', 'catalog', 'lists', [], [], $options ); | 
| @@ -48,7 +48,7 @@ | ||
| 48 | 48 | ->will( $this->returnValue( 'test' ) ); | 
| 49 | 49 | |
| 50 | 50 | $this->mock->expects( $this->once() )->method( 'file' ) | 
| 51 | - ->will( $this->returnValue( $view) ); | |
| 51 | + ->will( $this->returnValue( $view ) ); | |
| 52 | 52 | |
| 53 | 53 | $result = $this->object->render( $v, 'filepath', array( 'key' => 'value' ) ); | 
| 54 | 54 | $this->assertEquals( 'test', $result ); | 
| @@ -10,16 +10,16 @@ | ||
| 10 | 10 | * Set error reporting to maximum | 
| 11 | 11 | */ | 
| 12 | 12 | error_reporting( -1 ); | 
| 13 | -ini_set('display_errors', '1'); | |
| 13 | +ini_set( 'display_errors', '1' ); | |
| 14 | 14 | |
| 15 | 15 | |
| 16 | 16 | /* | 
| 17 | 17 | * Set locale settings to reasonable defaults | 
| 18 | 18 | */ | 
| 19 | -setlocale(LC_ALL, 'en_US.UTF-8'); | |
| 20 | -setlocale(LC_NUMERIC, 'POSIX'); | |
| 21 | -setlocale(LC_CTYPE, 'en_US.UTF-8'); | |
| 22 | -setlocale(LC_TIME, 'POSIX'); | |
| 19 | +setlocale( LC_ALL, 'en_US.UTF-8' ); | |
| 20 | +setlocale( LC_NUMERIC, 'POSIX' ); | |
| 21 | +setlocale( LC_CTYPE, 'en_US.UTF-8' ); | |
| 22 | +setlocale( LC_TIME, 'POSIX' ); | |
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | require_once 'TestHelper.php'; |