Completed
Push — master ( a4e8a9...31faa3 )
by Aimeos
02:22
created
controller/frontend/tests/Controller/Frontend/Attribute/StandardTest.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@  discard block
 block discarded – undo
16 16
 
17 17
 	protected function setUp()
18 18
 	{
19
-		$this->object = new \Aimeos\Controller\Frontend\Attribute\Standard( \TestHelperFrontend::getContext() );
19
+		$this->object = new \Aimeos\Controller\Frontend\Attribute\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
 
@@ -30,51 +30,51 @@  discard block
 block discarded – undo
30 30
 	{
31 31
 		$filter = $this->object->createFilter();
32 32
 
33
-		$this->assertInstanceOf( '\\Aimeos\\MW\\Criteria\\Iface', $filter );
34
-		$this->assertEquals( 1, count( $filter->getSortations() ) );
35
-		$this->assertEquals( 0, $filter->getSliceStart() );
36
-		$this->assertEquals( 100, $filter->getSliceSize() );
33
+		$this->assertInstanceOf('\\Aimeos\\MW\\Criteria\\Iface', $filter);
34
+		$this->assertEquals(1, count($filter->getSortations()));
35
+		$this->assertEquals(0, $filter->getSliceStart());
36
+		$this->assertEquals(100, $filter->getSliceSize());
37 37
 	}
38 38
 
39 39
 
40 40
 	public function testAddFilterTypes()
41 41
 	{
42 42
 		$filter = $this->object->createFilter();
43
-		$filter = $this->object->addFilterTypes( $filter, ['size'] );
43
+		$filter = $this->object->addFilterTypes($filter, ['size']);
44 44
 
45 45
 		$list = $filter->getConditions()->getExpressions();
46 46
 
47
-		if( !isset( $list[0] ) || !( $list[0] instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface ) ) {
48
-			throw new \RuntimeException( 'Wrong expression' );
47
+		if (!isset($list[0]) || !($list[0] instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface)) {
48
+			throw new \RuntimeException('Wrong expression');
49 49
 		}
50 50
 
51
-		$this->assertEquals( 'attribute.type.code', $list[0]->getName() );
52
-		$this->assertEquals( 1, count( $list[0]->getValue() ) );
51
+		$this->assertEquals('attribute.type.code', $list[0]->getName());
52
+		$this->assertEquals(1, count($list[0]->getValue()));
53 53
 	}
54 54
 
55 55
 
56 56
 	public function testGetItem()
57 57
 	{
58 58
 		$context = \TestHelperFrontend::getContext();
59
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'attribute' );
60
-		$id = $manager->findItem( 'xs', [], 'product', 'size' )->getId();
59
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'attribute');
60
+		$id = $manager->findItem('xs', [], 'product', 'size')->getId();
61 61
 
62
-		$result = $this->object->getItem( $id, ['text'] );
62
+		$result = $this->object->getItem($id, ['text']);
63 63
 
64
-		$this->assertInstanceOf( '\Aimeos\MShop\Attribute\Item\Iface', $result );
65
-		$this->assertEquals( 3, count( $result->getRefItems( 'text' ) ) );
64
+		$this->assertInstanceOf('\Aimeos\MShop\Attribute\Item\Iface', $result);
65
+		$this->assertEquals(3, count($result->getRefItems('text')));
66 66
 	}
67 67
 
68 68
 
69 69
 	public function testSearchItems()
70 70
 	{
71 71
 		$filter = $this->object->createFilter();
72
-		$filter = $this->object->addFilterTypes( $filter, ['size'] );
72
+		$filter = $this->object->addFilterTypes($filter, ['size']);
73 73
 
74 74
 		$total = 0;
75
-		$results = $this->object->searchItems( $filter, ['text'], $total );
75
+		$results = $this->object->searchItems($filter, ['text'], $total);
76 76
 
77
-		$this->assertEquals( 6, $total );
78
-		$this->assertEquals( 6, count( $results ) );
77
+		$this->assertEquals(6, $total);
78
+		$this->assertEquals(6, count($results));
79 79
 	}
80 80
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Catalog/Decorator/Base.php 1 patch
Spacing   +40 added lines, -40 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->controller->createManager( $name );
69
+		return $this->controller->createManager($name);
70 70
 	}
71 71
 
72 72
 
@@ -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 2017.03
94 94
 	 */
95
-	public function getPath( $id, array $domains = array( 'text', 'media' ) )
95
+	public function getPath($id, array $domains = array('text', 'media'))
96 96
 	{
97
-		return $this->controller->getPath( $id, $domains );
97
+		return $this->controller->getPath($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 2017.03
111 111
 	 */
112
-	public function getTree( $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 getTree($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->controller->getTree( $id, $domains, $level, $search );
115
+		return $this->controller->getTree($id, $domains, $level, $search);
116 116
 	}
117 117
 
118 118
 
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
 	 * @since 2015.08
125 125
 	 * @deprecated Use createFilter() instead
126 126
 	 */
127
-	public function createCatalogFilter( $default = true )
127
+	public function createCatalogFilter($default = true)
128 128
 	{
129
-		return $this->controller->createCatalogFilter( $default );
129
+		return $this->controller->createCatalogFilter($default);
130 130
 	}
131 131
 
132 132
 
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
 	 * @since 2015.08
141 141
 	 * @deprecated Use getPath() instead
142 142
 	 */
143
-	public function getCatalogPath( $id, array $domains = array( 'text', 'media' ) )
143
+	public function getCatalogPath($id, array $domains = array('text', 'media'))
144 144
 	{
145
-		return $this->controller->getCatalogPath( $id, $domains );
145
+		return $this->controller->getCatalogPath($id, $domains);
146 146
 	}
147 147
 
148 148
 
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
 	 * @since 2015.08
159 159
 	 * @deprecated Use getTree() instead
160 160
 	 */
161
-	public function getCatalogTree( $id = null, array $domains = array( 'text', 'media' ),
162
-		$level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE, \Aimeos\MW\Criteria\Iface $search = null )
161
+	public function getCatalogTree($id = null, array $domains = array('text', 'media'),
162
+		$level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE, \Aimeos\MW\Criteria\Iface $search = null)
163 163
 	{
164
-		return $this->controller->getCatalogTree( $id, $domains, $level, $search );
164
+		return $this->controller->getCatalogTree($id, $domains, $level, $search);
165 165
 	}
166 166
 
167 167
 
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
 	 * @since 2015.08
175 175
 	 * @deprecated Use product controller instead
176 176
 	 */
177
-	public function aggregateIndex( \Aimeos\MW\Criteria\Iface $filter, $key )
177
+	public function aggregateIndex(\Aimeos\MW\Criteria\Iface $filter, $key)
178 178
 	{
179
-		return $this->controller->aggregateIndex( $filter, $key );
179
+		return $this->controller->aggregateIndex($filter, $key);
180 180
 	}
181 181
 
182 182
 
@@ -189,9 +189,9 @@  discard block
 block discarded – undo
189 189
 	 * @since 2015.08
190 190
 	 * @deprecated Use product controller instead
191 191
 	 */
192
-	public function addIndexFilterCategory( \Aimeos\MW\Criteria\Iface $search, $catid )
192
+	public function addIndexFilterCategory(\Aimeos\MW\Criteria\Iface $search, $catid)
193 193
 	{
194
-		return $this->controller->addIndexFilterCategory( $search, $catid );
194
+		return $this->controller->addIndexFilterCategory($search, $catid);
195 195
 	}
196 196
 
197 197
 
@@ -205,9 +205,9 @@  discard block
 block discarded – undo
205 205
 	 * @since 2015.08
206 206
 	 * @deprecated Use product controller instead
207 207
 	 */
208
-	public function addIndexFilterText( \Aimeos\MW\Criteria\Iface $search, $input, $listtype = 'default' )
208
+	public function addIndexFilterText(\Aimeos\MW\Criteria\Iface $search, $input, $listtype = 'default')
209 209
 	{
210
-		return $this->controller->addIndexFilterText( $search, $input, $listtype );
210
+		return $this->controller->addIndexFilterText($search, $input, $listtype);
211 211
 	}
212 212
 
213 213
 
@@ -223,9 +223,9 @@  discard block
 block discarded – undo
223 223
 	 * @since 2015.08
224 224
 	 * @deprecated Use product controller instead
225 225
 	 */
226
-	public function createIndexFilter( $sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default' )
226
+	public function createIndexFilter($sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default')
227 227
 	{
228
-		return $this->controller->createIndexFilter( $sort, $direction, $start, $size, $listtype );
228
+		return $this->controller->createIndexFilter($sort, $direction, $start, $size, $listtype);
229 229
 	}
230 230
 
231 231
 
@@ -242,9 +242,9 @@  discard block
 block discarded – undo
242 242
 	 * @since 2015.08
243 243
 	 * @deprecated Use product controller instead
244 244
 	 */
245
-	public function createIndexFilterCategory( $catid, $sort = 'position', $direction = '+', $start = 0, $size = 100, $listtype = 'default' )
245
+	public function createIndexFilterCategory($catid, $sort = 'position', $direction = '+', $start = 0, $size = 100, $listtype = 'default')
246 246
 	{
247
-		return $this->controller->createIndexFilterCategory( $catid, $sort, $direction, $start, $size, $listtype );
247
+		return $this->controller->createIndexFilterCategory($catid, $sort, $direction, $start, $size, $listtype);
248 248
 	}
249 249
 
250 250
 
@@ -261,9 +261,9 @@  discard block
 block discarded – undo
261 261
 	 * @since 2015.08
262 262
 	 * @deprecated Use product controller instead
263 263
 	 */
264
-	public function createIndexFilterText( $input, $sort = 'relevance', $direction = '+', $start = 0, $size = 100, $listtype = 'default' )
264
+	public function createIndexFilterText($input, $sort = 'relevance', $direction = '+', $start = 0, $size = 100, $listtype = 'default')
265 265
 	{
266
-		return $this->controller->createIndexFilterText( $input, $sort, $direction, $start, $size, $listtype );
266
+		return $this->controller->createIndexFilterText($input, $sort, $direction, $start, $size, $listtype);
267 267
 	}
268 268
 
269 269
 
@@ -277,9 +277,9 @@  discard block
 block discarded – undo
277 277
 	 * @since 2015.08
278 278
 	 * @deprecated Use product controller instead
279 279
 	 */
280
-	public function getIndexItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null )
280
+	public function getIndexItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'price', 'text'), &$total = null)
281 281
 	{
282
-		return $this->controller->getIndexItems( $filter, $domains, $total );
282
+		return $this->controller->getIndexItems($filter, $domains, $total);
283 283
 	}
284 284
 
285 285
 
@@ -292,9 +292,9 @@  discard block
 block discarded – undo
292 292
 	 * @since 2015.08
293 293
 	 * @deprecated Use product controller instead
294 294
 	 */
295
-	public function getProductItems( array $ids, array $domains = array( 'media', 'price', 'text' ) )
295
+	public function getProductItems(array $ids, array $domains = array('media', 'price', 'text'))
296 296
 	{
297
-		return $this->controller->getProductItems( $ids, $domains );
297
+		return $this->controller->getProductItems($ids, $domains);
298 298
 	}
299 299
 
300 300
 
@@ -311,9 +311,9 @@  discard block
 block discarded – undo
311 311
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
312 312
 	 * @deprecated Use product controller instead
313 313
 	 */
314
-	public function createTextFilter( $input, $sort = null, $direction = '-', $start = 0, $size = 25, $listtype = 'default', $type = 'name' )
314
+	public function createTextFilter($input, $sort = null, $direction = '-', $start = 0, $size = 25, $listtype = 'default', $type = 'name')
315 315
 	{
316
-		return $this->controller->createTextFilter( $input, $sort, $direction, $start, $size, $listtype, $type );
316
+		return $this->controller->createTextFilter($input, $sort, $direction, $start, $size, $listtype, $type);
317 317
 	}
318 318
 
319 319
 
@@ -324,9 +324,9 @@  discard block
 block discarded – undo
324 324
 	 * @return array Associative list of the product ID as key and the product text as value
325 325
 	 * @deprecated Use product controller instead
326 326
 	 */
327
-	public function getTextList( \Aimeos\MW\Criteria\Iface $filter )
327
+	public function getTextList(\Aimeos\MW\Criteria\Iface $filter)
328 328
 	{
329
-		return $this->controller->getTextList( $filter );
329
+		return $this->controller->getTextList($filter);
330 330
 	}
331 331
 
332 332
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Service/Decorator/Base.php 1 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->controller->getServices( $type, $basket, $ref );
72
+		return $this->controller->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->controller->getServiceAttributes( $type, $serviceId, $basket );
87
+		return $this->controller->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->controller->getServicePrice( $type, $serviceId, $basket );
104
+		return $this->controller->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->controller->checkServiceAttributes( $type, $serviceId, $attributes );
120
+		return $this->controller->checkServiceAttributes($type, $serviceId, $attributes);
121 121
 	}
122 122
 
123 123
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Product/Decorator/Base.php 1 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->controller->addFilterAttribute( $filter, $attrIds, $optIds, $oneIds );
73
+		return $this->controller->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->controller->addFilterCategory( $filter, $catId, $level, $sort, $direction, $listtype );
92
+		return $this->controller->addFilterCategory($filter, $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->controller->addFilterText( $filter, $input, $sort, $direction, $listtype );
109
+		return $this->controller->addFilterText($filter, $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->controller->aggregate( $filter, $key );
123
+		return $this->controller->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->controller->createFilter( $sort, $direction, $start, $size, $listtype );
140
+		return $this->controller->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->controller->getItem( $productId, $domains );
154
+		return $this->controller->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->controller->getItems( $productIds, $domains );
168
+		return $this->controller->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->controller->searchItems( $filter, $domains, $total );
183
+		return $this->controller->searchItems($filter, $domains, $total);
184 184
 	}
185 185
 
186 186
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Basket/Decorator/Base.php 1 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->controller->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->controller->deleteProduct( $position );
132
+		$this->controller->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->controller->editProduct( $position, $quantity, $options, $configAttributeCodes );
147
+		$this->controller->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->controller->addCoupon( $code );
160
+		$this->controller->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->controller->deleteCoupon( $code );
173
+		$this->controller->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->controller->setAddress( $type, $value );
188
+		$this->controller->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->controller->setService( $type, $id, $attributes );
204
+		$this->controller->setService($type, $id, $attributes);
205 205
 	}
206 206
 
207 207
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Attribute/Standard.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
30 30
 	 * @since 2017.03
31 31
 	 */
32
-	public function addFilterTypes( \Aimeos\MW\Criteria\Iface $filter, array $codes )
32
+	public function addFilterTypes(\Aimeos\MW\Criteria\Iface $filter, array $codes)
33 33
 	{
34
-		if( !empty( $codes ) )
34
+		if (!empty($codes))
35 35
 		{
36 36
 			$expr = [
37
-				$filter->compare( '==', 'attribute.type.code', $codes ),
37
+				$filter->compare('==', 'attribute.type.code', $codes),
38 38
 				$filter->getConditions(),
39 39
 			];
40
-			$filter->setConditions( $filter->combine( '&&', $expr ) );
40
+			$filter->setConditions($filter->combine('&&', $expr));
41 41
 		}
42 42
 
43 43
 		return $filter;
@@ -53,15 +53,15 @@  discard block
 block discarded – undo
53 53
 	 */
54 54
 	public function createFilter()
55 55
 	{
56
-		$filter = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute' )->createSearch( true );
56
+		$filter = \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute')->createSearch(true);
57 57
 
58 58
 		$expr = array(
59
-			$filter->compare( '==', 'attribute.domain', 'product' ),
59
+			$filter->compare('==', 'attribute.domain', 'product'),
60 60
 			$filter->getConditions(),
61 61
 		);
62 62
 
63
-		$filter->setConditions( $filter->combine( '&&', $expr ) );
64
-		$filter->setSortations( array( $filter->sort( '+', 'attribute.position' ) ) );
63
+		$filter->setConditions($filter->combine('&&', $expr));
64
+		$filter->setSortations(array($filter->sort('+', 'attribute.position')));
65 65
 
66 66
 		return $filter;
67 67
 	}
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 	 * @return \Aimeos\MShop\Attribute\Item\Iface Attribute item including the referenced domains items
76 76
 	 * @since 2017.03
77 77
 	 */
78
-	public function getItem( $id, array $domains = array( 'media', 'price', 'text' ) )
78
+	public function getItem($id, array $domains = array('media', 'price', 'text'))
79 79
 	{
80
-		return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute' )->getItem( $id, $domains );
80
+		return \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute')->getItem($id, $domains);
81 81
 	}
82 82
 
83 83
 
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 	 * @return array Ordered list of attribute items implementing \Aimeos\MShop\Attribute\Item\Iface
91 91
 	 * @since 2017.03
92 92
 	 */
93
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null )
93
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'price', 'text'), &$total = null)
94 94
 	{
95
-		return \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute' )->searchItems( $filter, $domains, $total );
95
+		return \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute')->searchItems($filter, $domains, $total);
96 96
 	}
97 97
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Attribute/Iface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
28 28
 	 * @since 2017.03
29 29
 	 */
30
-	public function addFilterTypes( \Aimeos\MW\Criteria\Iface $filter, array $codes );
30
+	public function addFilterTypes(\Aimeos\MW\Criteria\Iface $filter, array $codes);
31 31
 
32 32
 
33 33
 	/**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @return \Aimeos\MShop\Attribute\Item\Iface Attribute item including the referenced domains items
48 48
 	 * @since 2017.03
49 49
 	 */
50
-	public function getItem( $id, array $domains = array( 'media', 'price', 'text' ) );
50
+	public function getItem($id, array $domains = array('media', 'price', 'text'));
51 51
 
52 52
 
53 53
 	/**
@@ -59,5 +59,5 @@  discard block
 block discarded – undo
59 59
 	 * @return array Ordered list of attribute items implementing \Aimeos\MShop\Attribute\Item\Iface
60 60
 	 * @since 2017.03
61 61
 	 */
62
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null );
62
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'price', 'text'), &$total = null);
63 63
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Attribute/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @param string|null $name Name of the controller implementaton (default: "Standard")
29 29
 	 * @return \Aimeos\Controller\Frontend\Attribute\Iface Controller object
30 30
 	 */
31
-	public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
31
+	public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
32 32
 	{
33 33
 		/** controller/frontend/attribute/name
34 34
 		 * Class name of the used attribute frontend controller implementation
@@ -63,20 +63,20 @@  discard block
 block discarded – undo
63 63
 		 * @since 2014.03
64 64
 		 * @category Developer
65 65
 		 */
66
-		if( $name === null ) {
67
-			$name = $context->getConfig()->get( 'controller/frontend/attribute/name', 'Standard' );
66
+		if ($name === null) {
67
+			$name = $context->getConfig()->get('controller/frontend/attribute/name', 'Standard');
68 68
 		}
69 69
 
70
-		if( ctype_alnum( $name ) === false )
70
+		if (ctype_alnum($name) === false)
71 71
 		{
72
-			$classname = is_string( $name ) ? '\\Aimeos\\Controller\\Frontend\\Attribute\\' . $name : '<not a string>';
73
-			throw new \Aimeos\Controller\Frontend\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
72
+			$classname = is_string($name) ? '\\Aimeos\\Controller\\Frontend\\Attribute\\' . $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\\Attribute\\Iface';
77 77
 		$classname = '\\Aimeos\\Controller\\Frontend\\Attribute\\' . $name;
78 78
 
79
-		$manager = self::createControllerBase( $context, $classname, $iface );
79
+		$manager = self::createControllerBase($context, $classname, $iface);
80 80
 
81 81
 		/** controller/frontend/attribute/decorators/excludes
82 82
 		 * Excludes decorators added by the "common" option from the attribute frontend controllers
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		 * @see controller/frontend/attribute/decorators/excludes
153 153
 		 * @see controller/frontend/attribute/decorators/global
154 154
 		 */
155
-		return self::addControllerDecorators( $context, $manager, 'attribute' );
155
+		return self::addControllerDecorators($context, $manager, 'attribute');
156 156
 	}
157 157
 
158 158
 }
Please login to merge, or discard this patch.