Completed
Push — master ( c0ed29...d5ba47 )
by Aimeos
02:55
created
controller/frontend/tests/Controller/Frontend/Product/StandardTest.php 1 patch
Spacing   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -16,22 +16,22 @@  discard block
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		$this->object = new \Aimeos\Controller\Frontend\Product\Standard( \TestHelperFrontend::getContext() );
19
+		$this->object = new \Aimeos\Controller\Frontend\Product\Standard(\TestHelperFrontend::getContext());
20 20
 	}
21 21
 
22 22
 
23 23
 	protected function tearDown()
24 24
 	{
25
-		unset( $this->object );
25
+		unset($this->object);
26 26
 	}
27 27
 
28 28
 
29 29
 	public function testAggregate()
30 30
 	{
31 31
 		$filter = $this->object->createFilter();
32
-		$list = $this->object->aggregate( $filter, 'index.attribute.id' );
32
+		$list = $this->object->aggregate($filter, 'index.attribute.id');
33 33
 
34
-		$this->assertGreaterThan( 0, count( $list ) );
34
+		$this->assertGreaterThan(0, count($list));
35 35
 	}
36 36
 
37 37
 
@@ -39,97 +39,97 @@  discard block
 block discarded – undo
39 39
 	{
40 40
 		$filter = $this->object->createFilter();
41 41
 
42
-		$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Iface', $filter );
43
-		$this->assertEquals( array(), $filter->getSortations() );
44
-		$this->assertEquals( 0, $filter->getSliceStart() );
45
-		$this->assertEquals( 100, $filter->getSliceSize() );
42
+		$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Iface', $filter);
43
+		$this->assertEquals(array(), $filter->getSortations());
44
+		$this->assertEquals(0, $filter->getSliceStart());
45
+		$this->assertEquals(100, $filter->getSliceSize());
46 46
 	}
47 47
 
48 48
 
49 49
 	public function testAddFilterAttribute()
50 50
 	{
51 51
 		$filter = $this->object->createFilter();
52
-		$filter = $this->object->addFilterAttribute( $filter, array( 0, 1 ), array(), array() );
52
+		$filter = $this->object->addFilterAttribute($filter, array(0, 1), array(), array());
53 53
 
54 54
 		$list = $filter->getConditions()->getExpressions();
55 55
 
56
-		if( !isset( $list[0] ) || !( $list[0] instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface ) ) {
57
-			throw new \RuntimeException( 'Wrong expression' );
56
+		if (!isset($list[0]) || !($list[0] instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface)) {
57
+			throw new \RuntimeException('Wrong expression');
58 58
 		}
59 59
 
60
-		$this->assertEquals( 'index.attributeaggregate([0,1])', $list[0]->getName() );
61
-		$this->assertEquals( 2, $list[0]->getValue() );
60
+		$this->assertEquals('index.attributeaggregate([0,1])', $list[0]->getName());
61
+		$this->assertEquals(2, $list[0]->getValue());
62 62
 	}
63 63
 
64 64
 
65 65
 	public function testAddFilterAttributeOptions()
66 66
 	{
67 67
 		$filter = $this->object->createFilter();
68
-		$filter = $this->object->addFilterAttribute( $filter, array(), array( 1 ), array() );
68
+		$filter = $this->object->addFilterAttribute($filter, array(), array(1), array());
69 69
 
70 70
 		$list = $filter->getConditions()->getExpressions();
71 71
 
72
-		if( !isset( $list[0] ) || !( $list[0] instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface ) ) {
73
-			throw new \RuntimeException( 'Wrong expression' );
72
+		if (!isset($list[0]) || !($list[0] instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface)) {
73
+			throw new \RuntimeException('Wrong expression');
74 74
 		}
75 75
 
76
-		$this->assertEquals( 'index.attributeaggregate([1])', $list[0]->getName() );
77
-		$this->assertEquals( 0, $list[0]->getValue() );
76
+		$this->assertEquals('index.attributeaggregate([1])', $list[0]->getName());
77
+		$this->assertEquals(0, $list[0]->getValue());
78 78
 	}
79 79
 
80 80
 
81 81
 	public function testAddFilterAttributeOne()
82 82
 	{
83 83
 		$filter = $this->object->createFilter();
84
-		$filter = $this->object->addFilterAttribute( $filter, array(), array(), array( 'test' => array( 2 ) ) );
84
+		$filter = $this->object->addFilterAttribute($filter, array(), array(), array('test' => array(2)));
85 85
 
86 86
 		$list = $filter->getConditions()->getExpressions();
87 87
 
88
-		if( !isset( $list[0] ) || !( $list[0] instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface ) ) {
89
-			throw new \RuntimeException( 'Wrong expression' );
88
+		if (!isset($list[0]) || !($list[0] instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface)) {
89
+			throw new \RuntimeException('Wrong expression');
90 90
 		}
91 91
 
92
-		$this->assertEquals( 'index.attributeaggregate([2])', $list[0]->getName() );
93
-		$this->assertEquals( 0, $list[0]->getValue() );
92
+		$this->assertEquals('index.attributeaggregate([2])', $list[0]->getName());
93
+		$this->assertEquals(0, $list[0]->getValue());
94 94
 	}
95 95
 
96 96
 
97 97
 	public function testAddFilterCategory()
98 98
 	{
99 99
 		$filter = $this->object->createFilter();
100
-		$filter = $this->object->addFilterCategory( $filter, 0 );
100
+		$filter = $this->object->addFilterCategory($filter, 0);
101 101
 
102 102
 		$list = $filter->getConditions()->getExpressions();
103 103
 
104
-		if( !isset( $list[0] ) || !( $list[0] instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface ) ) {
105
-			throw new \RuntimeException( 'Wrong expression' );
104
+		if (!isset($list[0]) || !($list[0] instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface)) {
105
+			throw new \RuntimeException('Wrong expression');
106 106
 		}
107 107
 
108
-		$this->assertEquals( 'index.catalog.id', $list[0]->getName() );
109
-		$this->assertEquals( array( 0 ), $list[0]->getValue() );
110
-		$this->assertEquals( array(), $filter->getSortations() );
108
+		$this->assertEquals('index.catalog.id', $list[0]->getName());
109
+		$this->assertEquals(array(0), $list[0]->getValue());
110
+		$this->assertEquals(array(), $filter->getSortations());
111 111
 	}
112 112
 
113 113
 
114 114
 	public function testAddFilterText()
115 115
 	{
116 116
 		$filter = $this->object->createFilter();
117
-		$filter = $this->object->addFilterText( $filter, 'Espresso' );
117
+		$filter = $this->object->addFilterText($filter, 'Espresso');
118 118
 
119
-		$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Iface', $filter );
119
+		$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Iface', $filter);
120 120
 
121 121
 		$list = $filter->getConditions()->getExpressions();
122 122
 
123 123
 
124
-		if( !isset( $list[0] ) || !( $list[0] instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface ) ) {
125
-			throw new \RuntimeException( 'Wrong expression' );
124
+		if (!isset($list[0]) || !($list[0] instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface)) {
125
+			throw new \RuntimeException('Wrong expression');
126 126
 		}
127
-		$this->assertEquals( 'index.text.relevance("default","de","Espresso")', $list[0]->getName() );
128
-		$this->assertEquals( 0, $list[0]->getValue() );
127
+		$this->assertEquals('index.text.relevance("default","de","Espresso")', $list[0]->getName());
128
+		$this->assertEquals(0, $list[0]->getValue());
129 129
 
130
-		$this->assertEquals( array(), $filter->getSortations() );
131
-		$this->assertEquals( 0, $filter->getSliceStart() );
132
-		$this->assertEquals( 100, $filter->getSliceSize() );
130
+		$this->assertEquals(array(), $filter->getSortations());
131
+		$this->assertEquals(0, $filter->getSliceStart());
132
+		$this->assertEquals(100, $filter->getSliceSize());
133 133
 	}
134 134
 
135 135
 
@@ -138,160 +138,160 @@  discard block
 block discarded – undo
138 138
 		$level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE;
139 139
 
140 140
 		$filter = $this->object->createFilter();
141
-		$filter = $this->object->addFilterCategory( $filter, 0, $level, 'relevance', '-', 'test' );
141
+		$filter = $this->object->addFilterCategory($filter, 0, $level, 'relevance', '-', 'test');
142 142
 
143
-		$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Iface', $filter );
143
+		$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Iface', $filter);
144 144
 
145 145
 		$sort = $filter->getSortations();
146
-		if( ( $item = reset( $sort ) ) === false ) {
147
-			throw new \RuntimeException( 'Sortation not set' );
146
+		if (($item = reset($sort)) === false) {
147
+			throw new \RuntimeException('Sortation not set');
148 148
 		}
149 149
 
150
-		$this->assertEquals( 'sort:index.catalog.position("test",["0"])', $item->getName() );
151
-		$this->assertEquals( '-', $item->getOperator() );
150
+		$this->assertEquals('sort:index.catalog.position("test",["0"])', $item->getName());
151
+		$this->assertEquals('-', $item->getOperator());
152 152
 	}
153 153
 
154 154
 
155 155
 	public function testCreateFilterSortRelevanceText()
156 156
 	{
157
-		$filter = $this->object->createFilter( 'relevance', '-', 1, 2, 'test' );
158
-		$filter = $this->object->addFilterText( $filter, 'Espresso' );
157
+		$filter = $this->object->createFilter('relevance', '-', 1, 2, 'test');
158
+		$filter = $this->object->addFilterText($filter, 'Espresso');
159 159
 
160
-		$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Iface', $filter );
161
-		$this->assertEquals( array(), $filter->getSortations() );
162
-		$this->assertEquals( 1, $filter->getSliceStart() );
163
-		$this->assertEquals( 2, $filter->getSliceSize() );
160
+		$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Iface', $filter);
161
+		$this->assertEquals(array(), $filter->getSortations());
162
+		$this->assertEquals(1, $filter->getSliceStart());
163
+		$this->assertEquals(2, $filter->getSliceSize());
164 164
 	}
165 165
 
166 166
 
167 167
 	public function testCreateFilterSortCode()
168 168
 	{
169
-		$filter = $this->object->createFilter( 'code' );
169
+		$filter = $this->object->createFilter('code');
170 170
 
171
-		$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Iface', $filter );
171
+		$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Iface', $filter);
172 172
 
173 173
 		$sort = $filter->getSortations();
174
-		if( ( $item = reset( $sort ) ) === false ) {
175
-			throw new \RuntimeException( 'Sortation not set' );
174
+		if (($item = reset($sort)) === false) {
175
+			throw new \RuntimeException('Sortation not set');
176 176
 		}
177 177
 
178
-		$this->assertEquals( 'product.code', $item->getName() );
178
+		$this->assertEquals('product.code', $item->getName());
179 179
 	}
180 180
 
181 181
 
182 182
 	public function testCreateFilterSortName()
183 183
 	{
184
-		$filter = $this->object->createFilter( 'name' );
184
+		$filter = $this->object->createFilter('name');
185 185
 
186
-		$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Iface', $filter );
186
+		$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Iface', $filter);
187 187
 
188 188
 		$sort = $filter->getSortations();
189
-		if( ( $item = reset( $sort ) ) === false ) {
190
-			throw new \RuntimeException( 'Sortation not set' );
189
+		if (($item = reset($sort)) === false) {
190
+			throw new \RuntimeException('Sortation not set');
191 191
 		}
192 192
 
193
-		$this->assertEquals( 'sort:index.text.value("default","de","name")', $item->getName() );
193
+		$this->assertEquals('sort:index.text.value("default","de","name")', $item->getName());
194 194
 	}
195 195
 
196 196
 
197 197
 	public function testCreateFilterSortPrice()
198 198
 	{
199
-		$filter = $this->object->createFilter( 'price' );
199
+		$filter = $this->object->createFilter('price');
200 200
 
201
-		$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Iface', $filter );
201
+		$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Iface', $filter);
202 202
 
203 203
 		$sort = $filter->getSortations();
204
-		if( ( $item = reset( $sort ) ) === false ) {
205
-			throw new \RuntimeException( 'Sortation not set' );
204
+		if (($item = reset($sort)) === false) {
205
+			throw new \RuntimeException('Sortation not set');
206 206
 		}
207 207
 
208
-		$this->assertStringStartsWith( 'sort:index.price.value("default","EUR","default")', $item->getName() );
208
+		$this->assertStringStartsWith('sort:index.price.value("default","EUR","default")', $item->getName());
209 209
 	}
210 210
 
211 211
 
212 212
 	public function testCreateFilterSortInvalid()
213 213
 	{
214
-		$filter = $this->object->createFilter( '', 'failure' );
214
+		$filter = $this->object->createFilter('', 'failure');
215 215
 
216
-		$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Iface', $filter );
217
-		$this->assertEquals( array(), $filter->getSortations() );
216
+		$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Iface', $filter);
217
+		$this->assertEquals(array(), $filter->getSortations());
218 218
 	}
219 219
 
220 220
 
221 221
 	public function testGetItem()
222 222
 	{
223 223
 		$context = \TestHelperFrontend::getContext();
224
-		$id = \Aimeos\MShop\Factory::createManager( $context, 'product' )->findItem( 'CNC' )->getId();
224
+		$id = \Aimeos\MShop\Factory::createManager($context, 'product')->findItem('CNC')->getId();
225 225
 
226
-		$result = $this->object->getItem( $id );
226
+		$result = $this->object->getItem($id);
227 227
 
228
-		$this->assertInstanceOf( '\Aimeos\MShop\Product\Item\Iface', $result );
229
-		$this->assertGreaterThan( 0, $result->getPropertyItems() );
230
-		$this->assertGreaterThan( 0, $result->getRefItems( 'attribute' ) );
231
-		$this->assertGreaterThan( 0, $result->getRefItems( 'media' ) );
232
-		$this->assertGreaterThan( 0, $result->getRefItems( 'price' ) );
233
-		$this->assertGreaterThan( 0, $result->getRefItems( 'product' ) );
234
-		$this->assertGreaterThan( 0, $result->getRefItems( 'text' ) );
228
+		$this->assertInstanceOf('\Aimeos\MShop\Product\Item\Iface', $result);
229
+		$this->assertGreaterThan(0, $result->getPropertyItems());
230
+		$this->assertGreaterThan(0, $result->getRefItems('attribute'));
231
+		$this->assertGreaterThan(0, $result->getRefItems('media'));
232
+		$this->assertGreaterThan(0, $result->getRefItems('price'));
233
+		$this->assertGreaterThan(0, $result->getRefItems('product'));
234
+		$this->assertGreaterThan(0, $result->getRefItems('text'));
235 235
 	}
236 236
 
237 237
 
238 238
 	public function testGetItems()
239 239
 	{
240 240
 		$context = \TestHelperFrontend::getContext();
241
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'product' );
241
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'product');
242 242
 
243 243
 		$search = $manager->createSearch();
244
-		$search->setConditions( $search->compare( '==', 'product.code', array( 'CNC', 'CNE' ) ) );
244
+		$search->setConditions($search->compare('==', 'product.code', array('CNC', 'CNE')));
245 245
 
246 246
 		$ids = array();
247
-		foreach( $manager->searchItems( $search ) as $productItem ) {
247
+		foreach ($manager->searchItems($search) as $productItem) {
248 248
 			$ids[] = $productItem->getId();
249 249
 		}
250 250
 
251 251
 
252
-		$result = $this->object->getItems( $ids );
252
+		$result = $this->object->getItems($ids);
253 253
 
254
-		$this->assertEquals( 2, count( $result ) );
254
+		$this->assertEquals(2, count($result));
255 255
 
256
-		foreach( $result as $productItem ) {
257
-			$this->assertInstanceOf( '\Aimeos\MShop\Product\Item\Iface', $productItem );
256
+		foreach ($result as $productItem) {
257
+			$this->assertInstanceOf('\Aimeos\MShop\Product\Item\Iface', $productItem);
258 258
 		}
259 259
 	}
260 260
 
261 261
 
262 262
 	public function testSearchItemsCategory()
263 263
 	{
264
-		$catalogManager = \Aimeos\MShop\Catalog\Manager\Factory::createManager( \TestHelperFrontend::getContext() );
264
+		$catalogManager = \Aimeos\MShop\Catalog\Manager\Factory::createManager(\TestHelperFrontend::getContext());
265 265
 		$search = $catalogManager->createSearch();
266 266
 
267
-		$search->setConditions( $search->compare( '==', 'catalog.code', 'new' ) );
268
-		$search->setSlice( 0, 1 );
269
-		$items = $catalogManager->searchItems( $search );
267
+		$search->setConditions($search->compare('==', 'catalog.code', 'new'));
268
+		$search->setSlice(0, 1);
269
+		$items = $catalogManager->searchItems($search);
270 270
 
271
-		if( ( $item = reset( $items ) ) === false ) {
272
-			throw new \RuntimeException( 'Product item not found' );
271
+		if (($item = reset($items)) === false) {
272
+			throw new \RuntimeException('Product item not found');
273 273
 		}
274 274
 
275
-		$filter = $this->object->createFilter( 'position', '+', 1, 1 );
276
-		$filter = $this->object->addFilterCategory( $filter, $item->getId() );
275
+		$filter = $this->object->createFilter('position', '+', 1, 1);
276
+		$filter = $this->object->addFilterCategory($filter, $item->getId());
277 277
 
278 278
 		$total = 0;
279
-		$results = $this->object->searchItems( $filter, array(), $total );
279
+		$results = $this->object->searchItems($filter, array(), $total);
280 280
 
281
-		$this->assertEquals( 3, $total );
282
-		$this->assertEquals( 1, count( $results ) );
281
+		$this->assertEquals(3, $total);
282
+		$this->assertEquals(1, count($results));
283 283
 	}
284 284
 
285 285
 
286 286
 	public function testSearchItemsText()
287 287
 	{
288
-		$filter = $this->object->createFilter( 'relevance', '+', 0, 1, 'unittype13' );
289
-		$filter = $this->object->addFilterText( $filter, 'Expresso', 'relevance', '+', 'unittype13' );
288
+		$filter = $this->object->createFilter('relevance', '+', 0, 1, 'unittype13');
289
+		$filter = $this->object->addFilterText($filter, 'Expresso', 'relevance', '+', 'unittype13');
290 290
 
291 291
 		$total = 0;
292
-		$results = $this->object->searchItems( $filter, array(), $total );
292
+		$results = $this->object->searchItems($filter, array(), $total);
293 293
 
294
-		$this->assertEquals( 2, $total );
295
-		$this->assertEquals( 1, count( $results ) );
294
+		$this->assertEquals(2, $total);
295
+		$this->assertEquals(1, count($results));
296 296
 	}
297 297
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Basket/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@
 block discarded – undo
212 212
 	/**
213 213
 	 * Returns the frontend controller
214 214
 	 *
215
-	 * @return \Aimeos\Controller\Frontend\Basket\Iface Frontend controller object
215
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
216 216
 	 */
217 217
 	protected function getController()
218 218
 	{
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -31,13 +31,13 @@  discard block
 block discarded – undo
31 31
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
32 32
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
33 33
 	 */
34
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
34
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
35 35
 	{
36 36
 		$iface = '\Aimeos\Controller\Frontend\Basket\Iface';
37
-		if( !( $controller instanceof $iface ) )
37
+		if (!($controller instanceof $iface))
38 38
 		{
39
-			$msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', get_class( $controller ), $iface );
40
-			throw new \Aimeos\Controller\Frontend\Exception( $msg );
39
+			$msg = sprintf('Class "%1$s" does not implement interface "%2$s"', get_class($controller), $iface);
40
+			throw new \Aimeos\Controller\Frontend\Exception($msg);
41 41
 		}
42 42
 
43 43
 		$this->context = $context;
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 	 * @return mixed Returns the value of the called method
54 54
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
55 55
 	 */
56
-	public function __call( $name, array $param )
56
+	public function __call($name, array $param)
57 57
 	{
58
-		return @call_user_func_array( array( $this->controller, $name ), $param );
58
+		return @call_user_func_array(array($this->controller, $name), $param);
59 59
 	}
60 60
 
61 61
 
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If the product isn't available
111 111
 	 * @return void
112 112
 	 */
113
-	public function addProduct( $prodid, $quantity = 1, array $options = array(), array $variantAttributeIds = array(),
113
+	public function addProduct($prodid, $quantity = 1, array $options = array(), array $variantAttributeIds = array(),
114 114
 		array $configAttributeIds = array(), array $hiddenAttributeIds = array(), array $customAttributeValues = array(),
115
-		$stocktype = 'default' )
115
+		$stocktype = 'default')
116 116
 	{
117 117
 		$this->getController()->addProduct(
118 118
 			$prodid, $quantity, $options, $variantAttributeIds, $configAttributeIds,
@@ -127,9 +127,9 @@  discard block
 block discarded – undo
127 127
 	 * @param integer $position Position number (key) of the order product item
128 128
 	 * @return void
129 129
 	 */
130
-	public function deleteProduct( $position )
130
+	public function deleteProduct($position)
131 131
 	{
132
-		$this->getController()->deleteProduct( $position );
132
+		$this->getController()->deleteProduct($position);
133 133
 	}
134 134
 
135 135
 
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
 	 * @param array $configAttributeCodes Codes of the product config attributes that should be REMOVED
143 143
 	 * @return void
144 144
 	 */
145
-	public function editProduct( $position, $quantity, array $options = array(), array $configAttributeCodes = array() )
145
+	public function editProduct($position, $quantity, array $options = array(), array $configAttributeCodes = array())
146 146
 	{
147
-		$this->getController()->editProduct( $position, $quantity, $options, $configAttributeCodes );
147
+		$this->getController()->editProduct($position, $quantity, $options, $configAttributeCodes);
148 148
 	}
149 149
 
150 150
 
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception if the coupon code is invalid or not allowed
156 156
 	 * @return void
157 157
 	 */
158
-	public function addCoupon( $code )
158
+	public function addCoupon($code)
159 159
 	{
160
-		$this->getController()->addCoupon( $code );
160
+		$this->getController()->addCoupon($code);
161 161
 	}
162 162
 
163 163
 
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception if the coupon code is invalid
169 169
 	 * @return void
170 170
 	 */
171
-	public function deleteCoupon( $code )
171
+	public function deleteCoupon($code)
172 172
 	{
173
-		$this->getController()->deleteCoupon( $code );
173
+		$this->getController()->deleteCoupon($code);
174 174
 	}
175 175
 
176 176
 
@@ -183,9 +183,9 @@  discard block
 block discarded – undo
183 183
 	 * 	if one of the keys is invalid when using an array with key/value pairs
184 184
 	 * @return void
185 185
 	 */
186
-	public function setAddress( $type, $value )
186
+	public function setAddress($type, $value)
187 187
 	{
188
-		$this->getController()->setAddress( $type, $value );
188
+		$this->getController()->setAddress($type, $value);
189 189
 	}
190 190
 
191 191
 
@@ -199,9 +199,9 @@  discard block
 block discarded – undo
199 199
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If there is no price to the service item attached
200 200
 	 * @return void
201 201
 	 */
202
-	public function setService( $type, $id, array $attributes = array() )
202
+	public function setService($type, $id, array $attributes = array())
203 203
 	{
204
-		$this->getController()->setService( $type, $id, $attributes );
204
+		$this->getController()->setService($type, $id, $attributes);
205 205
 	}
206 206
 
207 207
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Catalog/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -278,7 +278,7 @@
 block discarded – undo
278 278
 	/**
279 279
 	 * Returns the frontend controller
280 280
 	 *
281
-	 * @return \Aimeos\Controller\Frontend\Catalog\Iface Frontend controller object
281
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
282 282
 	 */
283 283
 	protected function getController()
284 284
 	{
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
31 31
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
32 32
 	 */
33
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
33
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
34 34
 	{
35 35
 		$iface = '\Aimeos\Controller\Frontend\Catalog\Iface';
36
-		if( !( $controller instanceof $iface ) )
36
+		if (!($controller instanceof $iface))
37 37
 		{
38
-			$msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', get_class( $controller ), $iface );
39
-			throw new \Aimeos\Controller\Frontend\Exception( $msg );
38
+			$msg = sprintf('Class "%1$s" does not implement interface "%2$s"', get_class($controller), $iface);
39
+			throw new \Aimeos\Controller\Frontend\Exception($msg);
40 40
 		}
41 41
 
42 42
 		$this->context = $context;
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	 * @return mixed Returns the value of the called method
53 53
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
54 54
 	 */
55
-	public function __call( $name, array $param )
55
+	public function __call($name, array $param)
56 56
 	{
57
-		return @call_user_func_array( array( $this->controller, $name ), $param );
57
+		return @call_user_func_array(array($this->controller, $name), $param);
58 58
 	}
59 59
 
60 60
 
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
 	 * @param string $name Name of the manager
65 65
 	 * @return \Aimeos\MShop\Common\Manager\Iface Manager object
66 66
 	 */
67
-	public function createManager( $name )
67
+	public function createManager($name)
68 68
 	{
69
-		return $this->getController()->createManager( $name );
69
+		return $this->getController()->createManager($name);
70 70
 	}
71 71
 
72 72
 
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object for filtering
78 78
 	 * @since 2015.08
79 79
 	 */
80
-	public function createCatalogFilter( $default = true )
80
+	public function createCatalogFilter($default = true)
81 81
 	{
82
-		return $this->getController()->createCatalogFilter( $default );
82
+		return $this->getController()->createCatalogFilter($default);
83 83
 	}
84 84
 
85 85
 
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
 	 * @return array Associative list of items implementing \Aimeos\MShop\Catalog\Item\Iface with their IDs as keys
93 93
 	 * @since 2015.08
94 94
 	 */
95
-	public function getCatalogPath( $id, array $domains = array( 'text', 'media' ) )
95
+	public function getCatalogPath($id, array $domains = array('text', 'media'))
96 96
 	{
97
-		return $this->getController()->getCatalogPath( $id, $domains );
97
+		return $this->getController()->getCatalogPath($id, $domains);
98 98
 	}
99 99
 
100 100
 
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
 	 * @return \Aimeos\MShop\Catalog\Item\Iface Catalog node, maybe with children depending on the level constant
110 110
 	 * @since 2015.08
111 111
 	 */
112
-	public function getCatalogTree( $id = null, array $domains = array( 'text', 'media' ),
113
-		$level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE, \Aimeos\MW\Criteria\Iface $search = null )
112
+	public function getCatalogTree($id = null, array $domains = array('text', 'media'),
113
+		$level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE, \Aimeos\MW\Criteria\Iface $search = null)
114 114
 	{
115
-		return $this->getController()->getCatalogTree( $id, $domains, $level, $search );
115
+		return $this->getController()->getCatalogTree($id, $domains, $level, $search);
116 116
 	}
117 117
 
118 118
 
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
 	 * @return array Associative list of key values as key and the product count for this key as value
125 125
 	 * @since 2015.08
126 126
 	 */
127
-	public function aggregateIndex( \Aimeos\MW\Criteria\Iface $filter, $key )
127
+	public function aggregateIndex(\Aimeos\MW\Criteria\Iface $filter, $key)
128 128
 	{
129
-		return $this->getController()->aggregateIndex( $filter, $key );
129
+		return $this->getController()->aggregateIndex($filter, $key);
130 130
 	}
131 131
 
132 132
 
@@ -138,9 +138,9 @@  discard block
 block discarded – undo
138 138
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
139 139
 	 * @since 2015.08
140 140
 	 */
141
-	public function addIndexFilterCategory( \Aimeos\MW\Criteria\Iface $search, $catid )
141
+	public function addIndexFilterCategory(\Aimeos\MW\Criteria\Iface $search, $catid)
142 142
 	{
143
-		return $this->getController()->addIndexFilterCategory( $search, $catid );
143
+		return $this->getController()->addIndexFilterCategory($search, $catid);
144 144
 	}
145 145
 
146 146
 
@@ -153,9 +153,9 @@  discard block
 block discarded – undo
153 153
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
154 154
 	 * @since 2015.08
155 155
 	 */
156
-	public function addIndexFilterText( \Aimeos\MW\Criteria\Iface $search, $input, $listtype = 'default' )
156
+	public function addIndexFilterText(\Aimeos\MW\Criteria\Iface $search, $input, $listtype = 'default')
157 157
 	{
158
-		return $this->getController()->addIndexFilterText( $search, $input, $listtype );
158
+		return $this->getController()->addIndexFilterText($search, $input, $listtype);
159 159
 	}
160 160
 
161 161
 
@@ -170,9 +170,9 @@  discard block
 block discarded – undo
170 170
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
171 171
 	 * @since 2015.08
172 172
 	 */
173
-	public function createIndexFilter( $sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default' )
173
+	public function createIndexFilter($sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default')
174 174
 	{
175
-		return $this->getController()->createIndexFilter( $sort, $direction, $start, $size, $listtype );
175
+		return $this->getController()->createIndexFilter($sort, $direction, $start, $size, $listtype);
176 176
 	}
177 177
 
178 178
 
@@ -188,9 +188,9 @@  discard block
 block discarded – undo
188 188
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
189 189
 	 * @since 2015.08
190 190
 	 */
191
-	public function createIndexFilterCategory( $catid, $sort = 'position', $direction = '+', $start = 0, $size = 100, $listtype = 'default' )
191
+	public function createIndexFilterCategory($catid, $sort = 'position', $direction = '+', $start = 0, $size = 100, $listtype = 'default')
192 192
 	{
193
-		return $this->getController()->createIndexFilter( $catid, $sort, $direction, $start, $size, $listtype );
193
+		return $this->getController()->createIndexFilter($catid, $sort, $direction, $start, $size, $listtype);
194 194
 	}
195 195
 
196 196
 
@@ -206,9 +206,9 @@  discard block
 block discarded – undo
206 206
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
207 207
 	 * @since 2015.08
208 208
 	 */
209
-	public function createIndexFilterText( $input, $sort = 'relevance', $direction = '+', $start = 0, $size = 100, $listtype = 'default' )
209
+	public function createIndexFilterText($input, $sort = 'relevance', $direction = '+', $start = 0, $size = 100, $listtype = 'default')
210 210
 	{
211
-		return $this->getController()->createIndexFilter( $input, $sort, $direction, $start, $size, $listtype );
211
+		return $this->getController()->createIndexFilter($input, $sort, $direction, $start, $size, $listtype);
212 212
 	}
213 213
 
214 214
 
@@ -221,9 +221,9 @@  discard block
 block discarded – undo
221 221
 	 * @return array Ordered list of product items implementing \Aimeos\MShop\Product\Item\Iface
222 222
 	 * @since 2015.08
223 223
 	 */
224
-	public function getIndexItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null )
224
+	public function getIndexItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'price', 'text'), &$total = null)
225 225
 	{
226
-		return $this->getController()->getIndexItems( $filter, $domains, $total );
226
+		return $this->getController()->getIndexItems($filter, $domains, $total);
227 227
 	}
228 228
 
229 229
 
@@ -235,9 +235,9 @@  discard block
 block discarded – undo
235 235
 	 * @return array List of product items implementing \Aimeos\MShop\Product\Item\Iface
236 236
 	 * @since 2015.08
237 237
 	 */
238
-	public function getProductItems( array $ids, array $domains = array( 'media', 'price', 'text' ) )
238
+	public function getProductItems(array $ids, array $domains = array('media', 'price', 'text'))
239 239
 	{
240
-		return $this->getController()->getProductItems( $ids, $domains );
240
+		return $this->getController()->getProductItems($ids, $domains);
241 241
 	}
242 242
 
243 243
 
@@ -253,9 +253,9 @@  discard block
 block discarded – undo
253 253
 	 * @param string $type Type of the text like "name", "short", "long", etc.
254 254
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
255 255
 	 */
256
-	public function createTextFilter( $input, $sort = null, $direction = '-', $start = 0, $size = 25, $listtype = 'default', $type = 'name' )
256
+	public function createTextFilter($input, $sort = null, $direction = '-', $start = 0, $size = 25, $listtype = 'default', $type = 'name')
257 257
 	{
258
-		return $this->getController()->createTextFilter( $input, $sort, $direction, $start, $size, $listtype, $type );
258
+		return $this->getController()->createTextFilter($input, $sort, $direction, $start, $size, $listtype, $type);
259 259
 	}
260 260
 
261 261
 
@@ -265,9 +265,9 @@  discard block
 block discarded – undo
265 265
 	 * @param \Aimeos\MW\Criteria\Iface $filter Critera object which contains the filter conditions
266 266
 	 * @return array Associative list of the product ID as key and the product text as value
267 267
 	 */
268
-	public function getTextList( \Aimeos\MW\Criteria\Iface $filter )
268
+	public function getTextList(\Aimeos\MW\Criteria\Iface $filter)
269 269
 	{
270
-		return $this->getController()->getTextList( $filter );
270
+		return $this->getController()->getTextList($filter);
271 271
 	}
272 272
 
273 273
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Order/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
 	/**
153 153
 	 * Returns the frontend controller
154 154
 	 *
155
-	 * @return \Aimeos\Controller\Frontend\Order\Iface Frontend controller object
155
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
156 156
 	 */
157 157
 	protected function getController()
158 158
 	{
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
31 31
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
32 32
 	 */
33
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
33
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
34 34
 	{
35 35
 		$iface = '\Aimeos\Controller\Frontend\Order\Iface';
36
-		if( !( $controller instanceof $iface ) )
36
+		if (!($controller instanceof $iface))
37 37
 		{
38
-			$msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', get_class( $controller ), $iface );
39
-			throw new \Aimeos\Controller\Frontend\Exception( $msg );
38
+			$msg = sprintf('Class "%1$s" does not implement interface "%2$s"', get_class($controller), $iface);
39
+			throw new \Aimeos\Controller\Frontend\Exception($msg);
40 40
 		}
41 41
 
42 42
 		$this->context = $context;
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	 * @return mixed Returns the value of the called method
53 53
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
54 54
 	 */
55
-	public function __call( $name, array $param )
55
+	public function __call($name, array $param)
56 56
 	{
57
-		return @call_user_func_array( array( $this->controller, $name ), $param );
57
+		return @call_user_func_array(array($this->controller, $name), $param);
58 58
 	}
59 59
 
60 60
 
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 	 * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object to be stored
69 69
 	 * @return \Aimeos\MShop\Order\Item\Iface Order item that belongs to the stored basket
70 70
 	 */
71
-	public function store( \Aimeos\MShop\Order\Item\Base\Iface $basket )
71
+	public function store(\Aimeos\MShop\Order\Item\Base\Iface $basket)
72 72
 	{
73
-		return $this->getController()->store( $basket );
73
+		return $this->getController()->store($basket);
74 74
 	}
75 75
 
76 76
 
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
 	 * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object
94 94
 	 * @return void
95 95
 	 */
96
-	public function block( \Aimeos\MShop\Order\Item\Iface $orderItem )
96
+	public function block(\Aimeos\MShop\Order\Item\Iface $orderItem)
97 97
 	{
98
-		$this->getController()->block( $orderItem );
98
+		$this->getController()->block($orderItem);
99 99
 	}
100 100
 
101 101
 
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
 	 * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object
119 119
 	 * @return void
120 120
 	 */
121
-	public function unblock( \Aimeos\MShop\Order\Item\Iface $orderItem )
121
+	public function unblock(\Aimeos\MShop\Order\Item\Iface $orderItem)
122 122
 	{
123
-		$this->getController()->unblock( $orderItem );
123
+		$this->getController()->unblock($orderItem);
124 124
 	}
125 125
 
126 126
 
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
 	 * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object
140 140
 	 * @return void
141 141
 	 */
142
-	public function update( \Aimeos\MShop\Order\Item\Iface $orderItem )
142
+	public function update(\Aimeos\MShop\Order\Item\Iface $orderItem)
143 143
 	{
144
-		$this->getController()->update( $orderItem );
144
+		$this->getController()->update($orderItem);
145 145
 	}
146 146
 
147 147
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Product/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
 	/**
192 192
 	 * Returns the frontend controller
193 193
 	 *
194
-	 * @return \Aimeos\Controller\Frontend\Product\Iface Frontend controller object
194
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
195 195
 	 */
196 196
 	protected function getController()
197 197
 	{
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
31 31
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
32 32
 	 */
33
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
33
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
34 34
 	{
35 35
 		$iface = '\Aimeos\Controller\Frontend\Product\Iface';
36
-		if( !( $controller instanceof $iface ) )
36
+		if (!($controller instanceof $iface))
37 37
 		{
38
-			$msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', get_class( $controller ), $iface );
39
-			throw new \Aimeos\Controller\Frontend\Exception( $msg );
38
+			$msg = sprintf('Class "%1$s" does not implement interface "%2$s"', get_class($controller), $iface);
39
+			throw new \Aimeos\Controller\Frontend\Exception($msg);
40 40
 		}
41 41
 
42 42
 		$this->context = $context;
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	 * @return mixed Returns the value of the called method
53 53
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
54 54
 	 */
55
-	public function __call( $name, array $param )
55
+	public function __call($name, array $param)
56 56
 	{
57
-		return @call_user_func_array( array( $this->controller, $name ), $param );
57
+		return @call_user_func_array(array($this->controller, $name), $param);
58 58
 	}
59 59
 
60 60
 
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
69 69
 	 * @since 2017.03
70 70
 	 */
71
-	public function addFilterAttribute( \Aimeos\MW\Criteria\Iface $filter, array $attrIds, array $optIds, array $oneIds )
71
+	public function addFilterAttribute(\Aimeos\MW\Criteria\Iface $filter, array $attrIds, array $optIds, array $oneIds)
72 72
 	{
73
-		return $this->getController()->addFilterAttribute( $filter, $attrIds, $optIds, $oneIds );
73
+		return $this->getController()->addFilterAttribute($filter, $attrIds, $optIds, $oneIds);
74 74
 	}
75 75
 
76 76
 
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
87 87
 	 * @since 2017.03
88 88
 	 */
89
-	public function addFilterCategory( \Aimeos\MW\Criteria\Iface $filter, $catId,
90
-		$level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE, $sort = null, $direction = '+', $listtype = 'default' )
89
+	public function addFilterCategory(\Aimeos\MW\Criteria\Iface $filter, $catId,
90
+		$level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE, $sort = null, $direction = '+', $listtype = 'default')
91 91
 	{
92
-		return $this->getController()->addFilterCategory( $search, $catid, $level, $sort, $direction, $listtype );
92
+		return $this->getController()->addFilterCategory($search, $catid, $level, $sort, $direction, $listtype);
93 93
 	}
94 94
 
95 95
 
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
105 105
 	 * @since 2017.03
106 106
 	 */
107
-	public function addFilterText( \Aimeos\MW\Criteria\Iface $filter, $input, $sort = null, $direction = '+', $listtype = 'default' )
107
+	public function addFilterText(\Aimeos\MW\Criteria\Iface $filter, $input, $sort = null, $direction = '+', $listtype = 'default')
108 108
 	{
109
-		return $this->getController()->addProductFilterText( $search, $input, $sort, $direction, $listtype );
109
+		return $this->getController()->addProductFilterText($search, $input, $sort, $direction, $listtype);
110 110
 	}
111 111
 
112 112
 
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
 	 * @return array Associative list of key values as key and the product count for this key as value
119 119
 	 * @since 2015.08
120 120
 	 */
121
-	public function aggregate( \Aimeos\MW\Criteria\Iface $filter, $key )
121
+	public function aggregate(\Aimeos\MW\Criteria\Iface $filter, $key)
122 122
 	{
123
-		return $this->getController()->aggregate( $filter, $key );
123
+		return $this->getController()->aggregate($filter, $key);
124 124
 	}
125 125
 
126 126
 
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
136 136
 	 * @since 2015.08
137 137
 	 */
138
-	public function createFilter( $sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default' )
138
+	public function createFilter($sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default')
139 139
 	{
140
-		return $this->getController()->createFilter( $sort, $direction, $start, $size, $listtype );
140
+		return $this->getController()->createFilter($sort, $direction, $start, $size, $listtype);
141 141
 	}
142 142
 
143 143
 
@@ -149,9 +149,9 @@  discard block
 block discarded – undo
149 149
 	 * @return \Aimeos\MShop\Product\Item\Iface Product item including the referenced domains items
150 150
 	 * @since 2017.03
151 151
 	 */
152
-	public function getItem( $productId, array $domains = array( 'attribute', 'media', 'price', 'product', 'product/property', 'text' ) )
152
+	public function getItem($productId, array $domains = array('attribute', 'media', 'price', 'product', 'product/property', 'text'))
153 153
 	{
154
-		return $this->getController()->getItem( $productId, $domains );
154
+		return $this->getController()->getItem($productId, $domains);
155 155
 	}
156 156
 
157 157
 
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
 	 * @return \Aimeos\MShop\Product\Item\Iface[] Associative list of product IDs as keys and product items as values
164 164
 	 * @since 2017.03
165 165
 	 */
166
-	public function getItems( array $productIds, array $domains = array( 'media', 'price', 'text' ) )
166
+	public function getItems(array $productIds, array $domains = array('media', 'price', 'text'))
167 167
 	{
168
-		return $this->getController()->getItems( $productIds, $domains );
168
+		return $this->getController()->getItems($productIds, $domains);
169 169
 	}
170 170
 
171 171
 
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
 	 * @return array Ordered list of product items implementing \Aimeos\MShop\Product\Item\Iface
179 179
 	 * @since 2015.08
180 180
 	 */
181
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null )
181
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'price', 'text'), &$total = null)
182 182
 	{
183
-		return $this->getController()->searchItems( $filter, $domains, $total );
183
+		return $this->getController()->searchItems($filter, $domains, $total);
184 184
 	}
185 185
 
186 186
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Service/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
 	/**
129 129
 	 * Returns the frontend controller
130 130
 	 *
131
-	 * @return \Aimeos\Controller\Frontend\Service\Iface Frontend controller object
131
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
132 132
 	 */
133 133
 	protected function getController()
134 134
 	{
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	 * @param \Aimeos\Controller\Frontend\Iface $controller Controller object
31 31
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects
32 32
 	 */
33
-	public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context )
33
+	public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context)
34 34
 	{
35 35
 		$iface = '\Aimeos\Controller\Frontend\Service\Iface';
36
-		if( !( $controller instanceof $iface ) )
36
+		if (!($controller instanceof $iface))
37 37
 		{
38
-			$msg = sprintf( 'Class "%1$s" does not implement interface "%2$s"', get_class( $controller ), $iface );
39
-			throw new \Aimeos\Controller\Frontend\Exception( $msg );
38
+			$msg = sprintf('Class "%1$s" does not implement interface "%2$s"', get_class($controller), $iface);
39
+			throw new \Aimeos\Controller\Frontend\Exception($msg);
40 40
 		}
41 41
 
42 42
 		$this->context = $context;
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	 * @return mixed Returns the value of the called method
53 53
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
54 54
 	 */
55
-	public function __call( $name, array $param )
55
+	public function __call($name, array $param)
56 56
 	{
57
-		return @call_user_func_array( array( $this->controller, $name ), $param );
57
+		return @call_user_func_array(array($this->controller, $name), $param);
58 58
 	}
59 59
 
60 60
 
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 	 * @param array $ref List of domains for which the items referenced by the services should be fetched too
67 67
 	 * @return array List of service items implementing \Aimeos\MShop\Service\Item\Iface with referenced items
68 68
 	 */
69
-	public function getServices( $type, \Aimeos\MShop\Order\Item\Base\Iface $basket,
70
-		$ref = array( 'media', 'price', 'text' ) )
69
+	public function getServices($type, \Aimeos\MShop\Order\Item\Base\Iface $basket,
70
+		$ref = array('media', 'price', 'text'))
71 71
 	{
72
-		return $this->getController()->getServices( $type, $basket, $ref );
72
+		return $this->getController()->getServices($type, $basket, $ref);
73 73
 	}
74 74
 
75 75
 
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
 	 * @param \Aimeos\MShop\Order\Item\Base\Iface $basket Basket object
83 83
 	 * @return array List of attribute definitions implementing \Aimeos\MW\Criteria\Attribute\Iface
84 84
 	 */
85
-	public function getServiceAttributes( $type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket )
85
+	public function getServiceAttributes($type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket)
86 86
 	{
87
-		return $this->getController()->getServiceAttributes( $type, $serviceId, $basket );
87
+		return $this->getController()->getServiceAttributes($type, $serviceId, $basket);
88 88
 	}
89 89
 
90 90
 
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 	 * @throws \Aimeos\MShop\Exception If service provider isn't available
100 100
 	 * @throws \Exception If an error occurs
101 101
 	 */
102
-	public function getServicePrice( $type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket )
102
+	public function getServicePrice($type, $serviceId, \Aimeos\MShop\Order\Item\Base\Iface $basket)
103 103
 	{
104
-		return $this->getController()->getServicePrice( $type, $serviceId, $basket );
104
+		return $this->getController()->getServicePrice($type, $serviceId, $basket);
105 105
 	}
106 106
 
107 107
 
@@ -115,9 +115,9 @@  discard block
 block discarded – undo
115 115
 	 * @return array List of key/value pairs of attributes keys and an error message for values that are invalid or
116 116
 	 * 	missing
117 117
 	 */
118
-	public function checkServiceAttributes( $type, $serviceId, array $attributes )
118
+	public function checkServiceAttributes($type, $serviceId, array $attributes)
119 119
 	{
120
-		return $this->getController()->checkServiceAttributes( $type, $serviceId, $attributes );
120
+		return $this->getController()->checkServiceAttributes($type, $serviceId, $attributes);
121 121
 	}
122 122
 
123 123
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Basket/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
30 30
 	 * @return \Aimeos\Controller\Frontend\Basket\Iface Controller object
31 31
 	 */
32
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
32
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
33 33
 	{
34 34
 		/** controller/frontend/basket/name
35 35
 		 * Class name of the used basket frontend controller implementation
@@ -64,20 +64,20 @@  discard block
 block discarded – undo
64 64
 		 * @since 2014.03
65 65
 		 * @category Developer
66 66
 		 */
67
-		if( $name === null ) {
68
-			$name = $context->getConfig()->get( 'controller/frontend/basket/name', 'Standard' );
67
+		if ($name === null) {
68
+			$name = $context->getConfig()->get('controller/frontend/basket/name', 'Standard');
69 69
 		}
70 70
 
71
-		if( ctype_alnum( $name ) === false )
71
+		if (ctype_alnum($name) === false)
72 72
 		{
73
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Basket\\' . $name : '<not a string>';
74
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
73
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Basket\\' . $name : '<not a string>';
74
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
75 75
 		}
76 76
 
77 77
 		$iface = '\\Aimeos\\Controller\\Frontend\\Basket\\Iface';
78 78
 		$classname = '\\Aimeos\\Controller\\Frontend\\Basket\\' . $name;
79 79
 
80
-		$manager = self::createControllerBase( $context, $classname, $iface );
80
+		$manager = self::createControllerBase($context, $classname, $iface);
81 81
 
82 82
 		/** controller/frontend/basket/decorators/excludes
83 83
 		 * Excludes decorators added by the "common" option from the basket frontend controllers
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 		 * @see controller/frontend/basket/decorators/excludes
154 154
 		 * @see controller/frontend/basket/decorators/global
155 155
 		 */
156
-		return self::addControllerDecorators( $context, $manager, 'basket' );
156
+		return self::addControllerDecorators($context, $manager, 'basket');
157 157
 	}
158 158
 
159 159
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Order/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
30 30
 	 * @return \Aimeos\Controller\Frontend\Order\Iface Controller object
31 31
 	 */
32
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
32
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
33 33
 	{
34 34
 		/** controller/frontend/order/name
35 35
 		 * Class name of the used order frontend controller implementation
@@ -64,19 +64,19 @@  discard block
 block discarded – undo
64 64
 		 * @since 2014.03
65 65
 		 * @category Developer
66 66
 		 */
67
-		if( $name === null ) {
68
-			$name = $context->getConfig()->get( 'controller/frontend/order/name', 'Standard' );
67
+		if ($name === null) {
68
+			$name = $context->getConfig()->get('controller/frontend/order/name', 'Standard');
69 69
 		}
70 70
 
71
-		if( ctype_alnum( $name ) === false ) {
72
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Order\\' . $name : '<not a string>';
73
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
71
+		if (ctype_alnum($name) === false) {
72
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Order\\' . $name : '<not a string>';
73
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
74 74
 		}
75 75
 
76 76
 		$iface = '\\Aimeos\\Controller\\Frontend\\Order\\Iface';
77 77
 		$classname = '\\Aimeos\\Controller\\Frontend\\Order\\' . $name;
78 78
 
79
-		$manager = self::createControllerBase( $context, $classname, $iface );
79
+		$manager = self::createControllerBase($context, $classname, $iface);
80 80
 
81 81
 		/** controller/frontend/order/decorators/excludes
82 82
 		 * Excludes decorators added by the "common" option from the order frontend controllers
@@ -152,6 +152,6 @@  discard block
 block discarded – undo
152 152
 		 * @see controller/frontend/order/decorators/excludes
153 153
 		 * @see controller/frontend/order/decorators/global
154 154
 		 */
155
-		return self::addControllerDecorators( $context, $manager, 'order' );
155
+		return self::addControllerDecorators($context, $manager, 'order');
156 156
 	}
157 157
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Catalog/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
30 30
 	 * @return \Aimeos\Controller\Frontend\Catalog\Iface Controller object
31 31
 	 */
32
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
32
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
33 33
 	{
34 34
 		/** controller/frontend/catalog/name
35 35
 		 * Class name of the used catalog frontend controller implementation
@@ -64,20 +64,20 @@  discard block
 block discarded – undo
64 64
 		 * @since 2014.03
65 65
 		 * @category Developer
66 66
 		 */
67
-		if( $name === null ) {
68
-			$name = $context->getConfig()->get( 'controller/frontend/catalog/name', 'Standard' );
67
+		if ($name === null) {
68
+			$name = $context->getConfig()->get('controller/frontend/catalog/name', 'Standard');
69 69
 		}
70 70
 
71
-		if( ctype_alnum( $name ) === false )
71
+		if (ctype_alnum($name) === false)
72 72
 		{
73
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Catalog\\' . $name : '<not a string>';
74
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
73
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Catalog\\' . $name : '<not a string>';
74
+			throw new \Aimeos\Controller\Frontend\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
75 75
 		}
76 76
 
77 77
 		$iface = '\\Aimeos\\Controller\\Frontend\\Catalog\\Iface';
78 78
 		$classname = '\\Aimeos\\Controller\\Frontend\\Catalog\\' . $name;
79 79
 
80
-		$manager = self::createControllerBase( $context, $classname, $iface );
80
+		$manager = self::createControllerBase($context, $classname, $iface);
81 81
 
82 82
 		/** controller/frontend/catalog/decorators/excludes
83 83
 		 * Excludes decorators added by the "common" option from the catalog frontend controllers
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 		 * @see controller/frontend/catalog/decorators/excludes
154 154
 		 * @see controller/frontend/catalog/decorators/global
155 155
 		 */
156
-		return self::addControllerDecorators( $context, $manager, 'catalog' );
156
+		return self::addControllerDecorators($context, $manager, 'catalog');
157 157
 	}
158 158
 
159 159
 }
Please login to merge, or discard this patch.