| @@ -66,8 +66,7 @@ | ||
| 66 | 66 |  			{ | 
| 67 | 67 | $this->execute( $stmt ); | 
| 68 | 68 | $this->status( 'done' ); | 
| 69 | - } | |
| 70 | - else | |
| 69 | + } else | |
| 71 | 70 |  			{ | 
| 72 | 71 | $this->status( 'OK' ); | 
| 73 | 72 | } | 
| @@ -132,56 +132,56 @@ discard block | ||
| 132 | 132 | |
| 133 | 133 | $this->assertTrue( $item->getId() !== null ); | 
| 134 | 134 | $this->assertEquals( $item->getId(), $itemSaved->getId() ); | 
| 135 | - $this->assertEquals( $item->getParentId(), $itemSaved->getParentId()); | |
| 136 | - $this->assertEquals( $item->getPosition(), $itemSaved->getPosition()); | |
| 137 | - $this->assertEquals( $item->getCompany(), $itemSaved->getCompany()); | |
| 138 | - $this->assertEquals( $item->getVatID(), $itemSaved->getVatID()); | |
| 139 | - $this->assertEquals( $item->getSalutation(), $itemSaved->getSalutation()); | |
| 140 | - $this->assertEquals( $item->getTitle(), $itemSaved->getTitle()); | |
| 141 | - $this->assertEquals( $item->getFirstname(), $itemSaved->getFirstname()); | |
| 142 | - $this->assertEquals( $item->getLastname(), $itemSaved->getLastname()); | |
| 143 | - $this->assertEquals( $item->getAddress1(), $itemSaved->getAddress1()); | |
| 144 | - $this->assertEquals( $item->getAddress2(), $itemSaved->getAddress2()); | |
| 145 | - $this->assertEquals( $item->getAddress3(), $itemSaved->getAddress3()); | |
| 146 | - $this->assertEquals( $item->getPostal(), $itemSaved->getPostal()); | |
| 147 | - $this->assertEquals( $item->getCity(), $itemSaved->getCity()); | |
| 148 | - $this->assertEquals( $item->getState(), $itemSaved->getState()); | |
| 149 | - $this->assertEquals( $item->getCountryId(), $itemSaved->getCountryId()); | |
| 150 | - $this->assertEquals( $item->getLanguageId(), $itemSaved->getLanguageId()); | |
| 151 | - $this->assertEquals( $item->getTelephone(), $itemSaved->getTelephone()); | |
| 152 | - $this->assertEquals( $item->getEmail(), $itemSaved->getEmail()); | |
| 153 | - $this->assertEquals( $item->getTelefax(), $itemSaved->getTelefax()); | |
| 154 | - $this->assertEquals( $item->getWebsite(), $itemSaved->getWebsite()); | |
| 155 | - $this->assertEquals( $item->getLongitude(), $itemSaved->getLongitude()); | |
| 156 | - $this->assertEquals( $item->getLatitude(), $itemSaved->getLatitude()); | |
| 135 | + $this->assertEquals( $item->getParentId(), $itemSaved->getParentId() ); | |
| 136 | + $this->assertEquals( $item->getPosition(), $itemSaved->getPosition() ); | |
| 137 | + $this->assertEquals( $item->getCompany(), $itemSaved->getCompany() ); | |
| 138 | + $this->assertEquals( $item->getVatID(), $itemSaved->getVatID() ); | |
| 139 | + $this->assertEquals( $item->getSalutation(), $itemSaved->getSalutation() ); | |
| 140 | + $this->assertEquals( $item->getTitle(), $itemSaved->getTitle() ); | |
| 141 | + $this->assertEquals( $item->getFirstname(), $itemSaved->getFirstname() ); | |
| 142 | + $this->assertEquals( $item->getLastname(), $itemSaved->getLastname() ); | |
| 143 | + $this->assertEquals( $item->getAddress1(), $itemSaved->getAddress1() ); | |
| 144 | + $this->assertEquals( $item->getAddress2(), $itemSaved->getAddress2() ); | |
| 145 | + $this->assertEquals( $item->getAddress3(), $itemSaved->getAddress3() ); | |
| 146 | + $this->assertEquals( $item->getPostal(), $itemSaved->getPostal() ); | |
| 147 | + $this->assertEquals( $item->getCity(), $itemSaved->getCity() ); | |
| 148 | + $this->assertEquals( $item->getState(), $itemSaved->getState() ); | |
| 149 | + $this->assertEquals( $item->getCountryId(), $itemSaved->getCountryId() ); | |
| 150 | + $this->assertEquals( $item->getLanguageId(), $itemSaved->getLanguageId() ); | |
| 151 | + $this->assertEquals( $item->getTelephone(), $itemSaved->getTelephone() ); | |
| 152 | + $this->assertEquals( $item->getEmail(), $itemSaved->getEmail() ); | |
| 153 | + $this->assertEquals( $item->getTelefax(), $itemSaved->getTelefax() ); | |
| 154 | + $this->assertEquals( $item->getWebsite(), $itemSaved->getWebsite() ); | |
| 155 | + $this->assertEquals( $item->getLongitude(), $itemSaved->getLongitude() ); | |
| 156 | + $this->assertEquals( $item->getLatitude(), $itemSaved->getLatitude() ); | |
| 157 | 157 | |
| 158 | 158 | $this->assertEquals( $this->editor, $itemSaved->getEditor() ); | 
| 159 | 159 |  		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() ); | 
| 160 | -		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified()); | |
| 160 | +		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() ); | |
| 161 | 161 | |
| 162 | 162 | $this->assertEquals( $itemExp->getId(), $itemUpd->getId() ); | 
| 163 | - $this->assertEquals( $itemExp->getParentId(), $itemUpd->getParentId()); | |
| 164 | - $this->assertEquals( $itemExp->getPosition(), $itemUpd->getPosition()); | |
| 165 | - $this->assertEquals( $itemExp->getCompany(), $itemUpd->getCompany()); | |
| 166 | - $this->assertEquals( $itemExp->getVatID(), $itemUpd->getVatID()); | |
| 167 | - $this->assertEquals( $itemExp->getSalutation(), $itemUpd->getSalutation()); | |
| 168 | - $this->assertEquals( $itemExp->getTitle(), $itemUpd->getTitle()); | |
| 169 | - $this->assertEquals( $itemExp->getFirstname(), $itemUpd->getFirstname()); | |
| 170 | - $this->assertEquals( $itemExp->getLastname(), $itemUpd->getLastname()); | |
| 171 | - $this->assertEquals( $itemExp->getAddress1(), $itemUpd->getAddress1()); | |
| 172 | - $this->assertEquals( $itemExp->getAddress2(), $itemUpd->getAddress2()); | |
| 173 | - $this->assertEquals( $itemExp->getAddress3(), $itemUpd->getAddress3()); | |
| 174 | - $this->assertEquals( $itemExp->getPostal(), $itemUpd->getPostal()); | |
| 175 | - $this->assertEquals( $itemExp->getCity(), $itemUpd->getCity()); | |
| 176 | - $this->assertEquals( $itemExp->getState(), $itemUpd->getState()); | |
| 177 | - $this->assertEquals( $itemExp->getCountryId(), $itemUpd->getCountryId()); | |
| 178 | - $this->assertEquals( $itemExp->getLanguageId(), $itemUpd->getLanguageId()); | |
| 179 | - $this->assertEquals( $itemExp->getTelephone(), $itemUpd->getTelephone()); | |
| 180 | - $this->assertEquals( $itemExp->getEmail(), $itemUpd->getEmail()); | |
| 181 | - $this->assertEquals( $itemExp->getTelefax(), $itemUpd->getTelefax()); | |
| 182 | - $this->assertEquals( $itemExp->getWebsite(), $itemUpd->getWebsite()); | |
| 183 | - $this->assertEquals( $itemExp->getLongitude(), $itemUpd->getLongitude()); | |
| 184 | - $this->assertEquals( $itemExp->getLatitude(), $itemUpd->getLatitude()); | |
| 163 | + $this->assertEquals( $itemExp->getParentId(), $itemUpd->getParentId() ); | |
| 164 | + $this->assertEquals( $itemExp->getPosition(), $itemUpd->getPosition() ); | |
| 165 | + $this->assertEquals( $itemExp->getCompany(), $itemUpd->getCompany() ); | |
| 166 | + $this->assertEquals( $itemExp->getVatID(), $itemUpd->getVatID() ); | |
| 167 | + $this->assertEquals( $itemExp->getSalutation(), $itemUpd->getSalutation() ); | |
| 168 | + $this->assertEquals( $itemExp->getTitle(), $itemUpd->getTitle() ); | |
| 169 | + $this->assertEquals( $itemExp->getFirstname(), $itemUpd->getFirstname() ); | |
| 170 | + $this->assertEquals( $itemExp->getLastname(), $itemUpd->getLastname() ); | |
| 171 | + $this->assertEquals( $itemExp->getAddress1(), $itemUpd->getAddress1() ); | |
| 172 | + $this->assertEquals( $itemExp->getAddress2(), $itemUpd->getAddress2() ); | |
| 173 | + $this->assertEquals( $itemExp->getAddress3(), $itemUpd->getAddress3() ); | |
| 174 | + $this->assertEquals( $itemExp->getPostal(), $itemUpd->getPostal() ); | |
| 175 | + $this->assertEquals( $itemExp->getCity(), $itemUpd->getCity() ); | |
| 176 | + $this->assertEquals( $itemExp->getState(), $itemUpd->getState() ); | |
| 177 | + $this->assertEquals( $itemExp->getCountryId(), $itemUpd->getCountryId() ); | |
| 178 | + $this->assertEquals( $itemExp->getLanguageId(), $itemUpd->getLanguageId() ); | |
| 179 | + $this->assertEquals( $itemExp->getTelephone(), $itemUpd->getTelephone() ); | |
| 180 | + $this->assertEquals( $itemExp->getEmail(), $itemUpd->getEmail() ); | |
| 181 | + $this->assertEquals( $itemExp->getTelefax(), $itemUpd->getTelefax() ); | |
| 182 | + $this->assertEquals( $itemExp->getWebsite(), $itemUpd->getWebsite() ); | |
| 183 | + $this->assertEquals( $itemExp->getLongitude(), $itemUpd->getLongitude() ); | |
| 184 | + $this->assertEquals( $itemExp->getLatitude(), $itemUpd->getLatitude() ); | |
| 185 | 185 | |
| 186 | 186 | $this->assertEquals( $this->editor, $itemUpd->getEditor() ); | 
| 187 | 187 | $this->assertEquals( $itemExp->getTimeCreated(), $itemUpd->getTimeCreated() ); | 
| @@ -190,7 +190,7 @@ discard block | ||
| 190 | 190 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved ); | 
| 191 | 191 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd ); | 
| 192 | 192 | |
| 193 | -		$this->setExpectedException('\\Aimeos\\MShop\\Exception'); | |
| 193 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); | |
| 194 | 194 | $this->object->getItem( $itemSaved->getId() ); | 
| 195 | 195 | } | 
| 196 | 196 | |
| @@ -60,10 +60,10 @@ discard block | ||
| 60 | 60 | public function testGetItem() | 
| 61 | 61 |  	{ | 
| 62 | 62 | $search = $this->object->createSearch(); | 
| 63 | - $search->setSlice(0, 1); | |
| 64 | - $results = $this->object->searchItems($search); | |
| 63 | + $search->setSlice( 0, 1 ); | |
| 64 | + $results = $this->object->searchItems( $search ); | |
| 65 | 65 | |
| 66 | -		if( ( $expected = reset($results) ) === false ) { | |
| 66 | +		if( ( $expected = reset( $results ) ) === false ) { | |
| 67 | 67 | throw new \RuntimeException( 'No list type item found' ); | 
| 68 | 68 | } | 
| 69 | 69 | |
| @@ -74,14 +74,14 @@ discard block | ||
| 74 | 74 | public function testSaveUpdateDeleteItem() | 
| 75 | 75 |  	{ | 
| 76 | 76 | $search = $this->object->createSearch(); | 
| 77 | - $search->setSlice(0, 1); | |
| 78 | - $results = $this->object->searchItems($search); | |
| 77 | + $search->setSlice( 0, 1 ); | |
| 78 | + $results = $this->object->searchItems( $search ); | |
| 79 | 79 | |
| 80 | -		if( ( $item = reset($results) ) === false ) { | |
| 80 | +		if( ( $item = reset( $results ) ) === false ) { | |
| 81 | 81 | throw new \RuntimeException( 'No type item found' ); | 
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | - $item->setId(null); | |
| 84 | + $item->setId( null ); | |
| 85 | 85 | $item->setCode( 'unitTestInit' ); | 
| 86 | 86 | $resultSaved = $this->object->saveItem( $item ); | 
| 87 | 87 | $itemSaved = $this->object->getItem( $item->getId() ); | 
| @@ -120,7 +120,7 @@ discard block | ||
| 120 | 120 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved ); | 
| 121 | 121 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd ); | 
| 122 | 122 | |
| 123 | -		$this->setExpectedException('\\Aimeos\\MShop\\Exception'); | |
| 123 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); | |
| 124 | 124 | $this->object->getItem( $itemSaved->getId() ); | 
| 125 | 125 | } | 
| 126 | 126 | |
| @@ -142,13 +142,13 @@ discard block | ||
| 142 | 142 | $expr[] = $search->compare( '==', 'customer.lists.type.editor', $this->editor ); | 
| 143 | 143 | |
| 144 | 144 | $search->setConditions( $search->combine( '&&', $expr ) ); | 
| 145 | - $search->setSlice(0, 1); | |
| 145 | + $search->setSlice( 0, 1 ); | |
| 146 | 146 | |
| 147 | 147 | $results = $this->object->searchItems( $search, [], $total ); | 
| 148 | 148 | $this->assertEquals( 1, count( $results ) ); | 
| 149 | 149 | $this->assertEquals( 1, $total ); | 
| 150 | 150 | |
| 151 | -		foreach($results as $itemId => $item) { | |
| 151 | +		foreach( $results as $itemId => $item ) { | |
| 152 | 152 | $this->assertEquals( $itemId, $item->getId() ); | 
| 153 | 153 | } | 
| 154 | 154 | } | 
| @@ -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() ); | 
| @@ -158,25 +158,25 @@ discard block | ||
| 158 | 158 | $expr[] = $search->compare( '>=', 'customer.property.type.ctime', '1970-01-01 00:00:00' ); | 
| 159 | 159 | $expr[] = $search->compare( '==', 'customer.property.type.editor', $this->editor ); | 
| 160 | 160 | |
| 161 | -		$search->setConditions( $search->combine('&&', $expr) ); | |
| 161 | + $search->setConditions( $search->combine( '&&', $expr ) ); | |
| 162 | 162 | $results = $this->object->searchItems( $search, [], $total ); | 
| 163 | 163 | $this->assertEquals( 1, count( $results ) ); | 
| 164 | 164 | |
| 165 | 165 | |
| 166 | 166 | $search = $this->object->createSearch(); | 
| 167 | 167 | $conditions = array( | 
| 168 | - $search->compare( '=~', 'customer.property.type.code', 'newsletter'), | |
| 168 | + $search->compare( '=~', 'customer.property.type.code', 'newsletter' ), | |
| 169 | 169 | $search->compare( '==', 'customer.property.type.editor', $this->editor ) | 
| 170 | 170 | ); | 
| 171 | -		$search->setConditions( $search->combine('&&', $conditions ) ); | |
| 172 | -		$search->setSortations( [$search->sort('-', 'customer.property.type.position' )] ); | |
| 173 | - $search->setSlice(0, 1); | |
| 174 | - $items = $this->object->searchItems( $search, [], $total); | |
| 171 | + $search->setConditions( $search->combine( '&&', $conditions ) ); | |
| 172 | + $search->setSortations( [$search->sort( '-', 'customer.property.type.position' )] ); | |
| 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 | } | 
| @@ -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 | } | 
| @@ -492,14 +492,14 @@ | ||
| 492 | 492 | |
| 493 | 493 | $results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level ); | 
| 494 | 494 |  			while( ( $row = $results->fetch() ) !== false ) { | 
| 495 | - $map[ $row['customer.id'] ] = $row; | |
| 495 | + $map[$row['customer.id']] = $row; | |
| 496 | 496 | } | 
| 497 | 497 | |
| 498 | 498 | $dbm->release( $conn, $dbname ); | 
| 499 | 499 | } | 
| 500 | 500 | catch( \Exception $e ) | 
| 501 | 501 |  		{ | 
| 502 | - $dbm->release( $conn, $dbname ); | |
| 502 | + $dbm->release( $conn, $dbname ); | |
| 503 | 503 | throw $e; | 
| 504 | 504 | } | 
| 505 | 505 | |
| @@ -340,8 +340,7 @@ | ||
| 340 | 340 | * @see mshop/customer/manager/fosuser/count | 
| 341 | 341 | */ | 
| 342 | 342 | $path = 'mshop/customer/manager/fosuser/insert'; | 
| 343 | - } | |
| 344 | - else | |
| 343 | + } else | |
| 345 | 344 |  			{ | 
| 346 | 345 | /** mshop/customer/manager/fosuser/update | 
| 347 | 346 | * Updates an existing customer record in the database | 
| @@ -8,7 +8,7 @@ discard block | ||
| 8 | 8 | |
| 9 | 9 | return array( | 
| 10 | 10 | 'table' => array( | 
| 11 | -		'fos_user' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 11 | +		'fos_user' => function( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 12 | 12 | |
| 13 | 13 | $table = $schema->createTable( 'fos_user' ); | 
| 14 | 14 | |
| @@ -48,7 +48,7 @@ discard block | ||
| 48 | 48 | $table->addColumn( 'vdate', 'date', array( 'notnull' => false ) ); | 
| 49 | 49 | $table->addColumn( 'mtime', 'datetime', array( 'notnull' => false ) ); | 
| 50 | 50 | $table->addColumn( 'ctime', 'datetime', array( 'notnull' => false ) ); | 
| 51 | -			$table->addColumn( 'editor', 'string', array('length' => 255 ) ); | |
| 51 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); | |
| 52 | 52 | |
| 53 | 53 | $table->setPrimaryKey( array( 'id' ), 'pk_fosus_id' ); | 
| 54 | 54 | $table->addUniqueIndex( array( 'confirmation_token' ), 'unq_fosus_confirmtoken' ); | 
| @@ -65,7 +65,7 @@ discard block | ||
| 65 | 65 | return $schema; | 
| 66 | 66 | }, | 
| 67 | 67 | |
| 68 | -		'fos_user_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 68 | +		'fos_user_address' => function( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 69 | 69 | |
| 70 | 70 | $table = $schema->createTable( 'fos_user_address' ); | 
| 71 | 71 | |
| @@ -95,7 +95,7 @@ discard block | ||
| 95 | 95 | $table->addColumn( 'latitude', 'float', array( 'notnull' => false ) ); | 
| 96 | 96 | $table->addColumn( 'mtime', 'datetime', [] ); | 
| 97 | 97 | $table->addColumn( 'ctime', 'datetime', [] ); | 
| 98 | -			$table->addColumn( 'editor', 'string', array('length' => 255 ) ); | |
| 98 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); | |
| 99 | 99 | |
| 100 | 100 | $table->setPrimaryKey( array( 'id' ), 'pk_fosad_id' ); | 
| 101 | 101 | $table->addIndex( array( 'parentid' ), 'idx_fosad_pid' ); | 
| @@ -112,7 +112,7 @@ discard block | ||
| 112 | 112 | return $schema; | 
| 113 | 113 | }, | 
| 114 | 114 | |
| 115 | -		'fos_user_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 115 | +		'fos_user_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 116 | 116 | |
| 117 | 117 | $table = $schema->createTable( 'fos_user_list_type' ); | 
| 118 | 118 | |
| @@ -136,7 +136,7 @@ discard block | ||
| 136 | 136 | return $schema; | 
| 137 | 137 | }, | 
| 138 | 138 | |
| 139 | -		'fos_user_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 139 | +		'fos_user_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 140 | 140 | |
| 141 | 141 | $table = $schema->createTable( 'fos_user_list' ); | 
| 142 | 142 | |
| @@ -165,7 +165,7 @@ discard block | ||
| 165 | 165 | return $schema; | 
| 166 | 166 | }, | 
| 167 | 167 | |
| 168 | -		'fos_user_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 168 | +		'fos_user_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 169 | 169 | |
| 170 | 170 | $table = $schema->createTable( 'fos_user_property_type' ); | 
| 171 | 171 | |
| @@ -189,7 +189,7 @@ discard block | ||
| 189 | 189 | return $schema; | 
| 190 | 190 | }, | 
| 191 | 191 | |
| 192 | -		'fos_user_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 192 | +		'fos_user_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) { | |
| 193 | 193 | |
| 194 | 194 | $table = $schema->createTable( 'fos_user_property' ); | 
| 195 | 195 | |
| @@ -63,7 +63,7 @@ discard block | ||
| 63 | 63 | public function testGetItem() | 
| 64 | 64 |  	{ | 
| 65 | 65 | $search = $this->object->createSearch(); | 
| 66 | - $search->setSlice(0, 1); | |
| 66 | + $search->setSlice( 0, 1 ); | |
| 67 | 67 | $results = $this->object->searchItems( $search ); | 
| 68 | 68 | |
| 69 | 69 |  		if( ( $item = reset( $results ) ) === false ) { | 
| @@ -77,7 +77,7 @@ discard block | ||
| 77 | 77 | public function testSaveUpdateDeleteItem() | 
| 78 | 78 |  	{ | 
| 79 | 79 | $search = $this->object->createSearch(); | 
| 80 | - $search->setSlice(0, 1); | |
| 80 | + $search->setSlice( 0, 1 ); | |
| 81 | 81 | $items = $this->object->searchItems( $search ); | 
| 82 | 82 | |
| 83 | 83 |  		if( ( $item = reset( $items ) ) === false ) { | 
| @@ -108,12 +108,12 @@ discard block | ||
| 108 | 108 | $this->assertEquals( $item->getDateEnd(), $itemSaved->getDateEnd() ); | 
| 109 | 109 | $this->assertEquals( $item->getPosition(), $itemSaved->getPosition() ); | 
| 110 | 110 | $this->assertEquals( $this->editor, $itemSaved->getEditor() ); | 
| 111 | -		$this->assertStringStartsWith(date('Y-m-d', time()), $itemSaved->getTimeCreated()); | |
| 112 | -		$this->assertStringStartsWith(date('Y-m-d', time()), $itemSaved->getTimeModified()); | |
| 111 | + $this->assertStringStartsWith( date( 'Y-m-d', time() ), $itemSaved->getTimeCreated() ); | |
| 112 | + $this->assertStringStartsWith( date( 'Y-m-d', time() ), $itemSaved->getTimeModified() ); | |
| 113 | 113 | |
| 114 | 114 | $this->assertEquals( $this->editor, $itemSaved->getEditor() ); | 
| 115 | 115 |  		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeCreated() ); | 
| 116 | -		$this->assertRegExp('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() ); | |
| 116 | +		$this->assertRegExp( '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', $itemSaved->getTimeModified() ); | |
| 117 | 117 | |
| 118 | 118 | $this->assertEquals( $itemExp->getId(), $itemUpd->getId() ); | 
| 119 | 119 | $this->assertEquals( $itemExp->getSiteId(), $itemUpd->getSiteId() ); | 
| @@ -132,7 +132,7 @@ discard block | ||
| 132 | 132 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultSaved ); | 
| 133 | 133 | $this->assertInstanceOf( \Aimeos\MShop\Common\Item\Iface::class, $resultUpd ); | 
| 134 | 134 | |
| 135 | -		$this->setExpectedException('\\Aimeos\\MShop\\Exception'); | |
| 135 | + $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); | |
| 136 | 136 | $this->object->getItem( $itemSaved->getId() ); | 
| 137 | 137 | } | 
| 138 | 138 | |
| @@ -278,8 +278,8 @@ discard block | ||
| 278 | 278 | |
| 279 | 279 | public function testGetSubManager() | 
| 280 | 280 |  	{ | 
| 281 | -		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type') ); | |
| 282 | -		$this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager('type', 'Standard') ); | |
| 281 | + $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type' ) ); | |
| 282 | + $this->assertInstanceOf( '\\Aimeos\\MShop\\Common\\Manager\\Iface', $this->object->getSubManager( 'type', 'Standard' ) ); | |
| 283 | 283 | |
| 284 | 284 | $this->setExpectedException( '\\Aimeos\\MShop\\Exception' ); | 
| 285 | 285 | $this->object->getSubManager( 'unknown' ); | 
| @@ -75,7 +75,7 @@ | ||
| 75 | 75 | 'customer.address.telefax' => '055544332212', 'customer.address.website' => 'www.example.com', | 
| 76 | 76 | 'customer.address.longitude' => '10.5', 'customer.address.latitude' => '51.0', | 
| 77 | 77 | 'customer.address.position' => '0', | 
| 78 | - ],[ | |
| 78 | + ], [ | |
| 79 | 79 | 'customer.address.company' => 'Example company LLC', 'customer.address.vatid' => 'DE999999999', | 
| 80 | 80 | 'customer.address.salutation' => 'mr', 'customer.address.title' => 'Dr.', | 
| 81 | 81 | 'customer.address.firstname' => 'Good', 'customer.address.lastname' => 'Unittest', |