@@ -216,13 +216,13 @@ |
||
216 | 216 | $expr[] = $search->compare( '==', 'customer.longitude', '10.0' ); |
217 | 217 | $expr[] = $search->compare( '==', 'customer.latitude', '50.0' ); |
218 | 218 | |
219 | - $param = ['text','default', 0]; |
|
219 | + $param = ['text', 'default', 0]; |
|
220 | 220 | $expr[] = $search->compare( '==', $search->createFunction( 'customer:has', $param ), null ); |
221 | 221 | |
222 | - $param = ['text','default', $listItem->getRefId()]; |
|
222 | + $param = ['text', 'default', $listItem->getRefId()]; |
|
223 | 223 | $expr[] = $search->compare( '!=', $search->createFunction( 'customer:has', $param ), null ); |
224 | 224 | |
225 | - $param = ['text','default']; |
|
225 | + $param = ['text', 'default']; |
|
226 | 226 | $expr[] = $search->compare( '!=', $search->createFunction( 'customer:has', $param ), null ); |
227 | 227 | |
228 | 228 | $param = ['text']; |
@@ -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,19 +159,19 @@ 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 ); |
@@ -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 | } |
@@ -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,7 +135,7 @@ 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 ) ); |