Completed
Push — master ( 921503...9109fd )
by Aimeos
02:03
created
controller/frontend/src/Controller/Frontend/Stock/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
 	/**
141 141
 	 * Returns the frontend controller
142 142
 	 *
143
-	 * @return \Aimeos\Controller\Frontend\Stock\Iface Frontend controller object
143
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
144 144
 	 */
145 145
 	protected function getController()
146 146
 	{
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 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
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Stock\\Iface', $controller );
35
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Stock\\Iface', $controller);
36 36
 
37 37
 		$this->controller = $controller;
38 38
 
39
-		parent::__construct( $context );
39
+		parent::__construct($context);
40 40
 	}
41 41
 
42 42
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 * @return mixed Returns the value of the called method
49 49
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
50 50
 	 */
51
-	public function __call( $name, array $param )
51
+	public function __call($name, array $param)
52 52
 	{
53
-		return @call_user_func_array( array( $this->controller, $name ), $param );
53
+		return @call_user_func_array(array($this->controller, $name), $param);
54 54
 	}
55 55
 
56 56
 
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
63 63
 	 * @since 2017.03
64 64
 	 */
65
-	public function addFilterCodes( \Aimeos\MW\Criteria\Iface $filter, array $codes )
65
+	public function addFilterCodes(\Aimeos\MW\Criteria\Iface $filter, array $codes)
66 66
 	{
67
-		return $this->controller->addFilterCodes( $filter, $codes );
67
+		return $this->controller->addFilterCodes($filter, $codes);
68 68
 	}
69 69
 
70 70
 
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 	 * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching
77 77
 	 * @since 2017.03
78 78
 	 */
79
-	public function addFilterTypes( \Aimeos\MW\Criteria\Iface $filter, array $codes )
79
+	public function addFilterTypes(\Aimeos\MW\Criteria\Iface $filter, array $codes)
80 80
 	{
81
-		return $this->controller->addFilterTypes( $filter, $codes );
81
+		return $this->controller->addFilterTypes($filter, $codes);
82 82
 	}
83 83
 
84 84
 
@@ -102,9 +102,9 @@  discard block
 block discarded – undo
102 102
 	 * @return \Aimeos\MShop\Stock\Item\Iface Stock item including the referenced domains items
103 103
 	 * @since 2017.03
104 104
 	 */
105
-	public function getItem( $id )
105
+	public function getItem($id)
106 106
 	{
107
-		return $this->controller->getItem( $id );
107
+		return $this->controller->getItem($id);
108 108
 	}
109 109
 
110 110
 
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 	 * @return array Ordered list of stock items implementing \Aimeos\MShop\Stock\Item\Iface
117 117
 	 * @since 2017.03
118 118
 	 */
119
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null )
119
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null)
120 120
 	{
121
-		return $this->controller->searchItems( $filter, $total );
121
+		return $this->controller->searchItems($filter, $total);
122 122
 	}
123 123
 
124 124
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Locale/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
 	/**
105 105
 	 * Returns the frontend controller
106 106
 	 *
107
-	 * @return \Aimeos\Controller\Frontend\Locale\Iface Frontend controller object
107
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
108 108
 	 */
109 109
 	protected function getController()
110 110
 	{
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 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
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Locale\\Iface', $controller );
35
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Locale\\Iface', $controller);
36 36
 
37 37
 		$this->controller = $controller;
38 38
 
39
-		parent::__construct( $context );
39
+		parent::__construct($context);
40 40
 	}
41 41
 
42 42
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 * @return mixed Returns the value of the called method
49 49
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
50 50
 	 */
51
-	public function __call( $name, array $param )
51
+	public function __call($name, array $param)
52 52
 	{
53
-		return @call_user_func_array( array( $this->controller, $name ), $param );
53
+		return @call_user_func_array(array($this->controller, $name), $param);
54 54
 	}
55 55
 
56 56
 
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
 	 * @return \Aimeos\MShop\Locale\Item\Iface Locale item including the referenced domains items
76 76
 	 * @since 2017.03
77 77
 	 */
78
-	public function getItem( $id, array $domains = [] )
78
+	public function getItem($id, array $domains = [])
79 79
 	{
80
-		return $this->controller->getItem( $id, $domains );
80
+		return $this->controller->getItem($id, $domains);
81 81
 	}
82 82
 
83 83
 
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 	 * @return array Ordered list of locale items implementing \Aimeos\MShop\Locale\Item\Iface
91 91
 	 * @since 2017.03
92 92
 	 */
93
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = [], &$total = null )
93
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = [], &$total = null)
94 94
 	{
95
-		return $this->controller->searchItems( $filter, $domains, $total );
95
+		return $this->controller->searchItems($filter, $domains, $total);
96 96
 	}
97 97
 
98 98
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Customer/Decorator/Base.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@
 block discarded – undo
231 231
 	/**
232 232
 	 * Returns the frontend controller
233 233
 	 *
234
-	 * @return \Aimeos\Controller\Frontend\Customer\Iface Frontend controller object
234
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
235 235
 	 * @since 2017.04
236 236
 	 */
237 237
 	protected function getController()
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 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
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Customer\\Iface', $controller );
35
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Customer\\Iface', $controller);
36 36
 
37 37
 		$this->controller = $controller;
38 38
 
39
-		parent::__construct( $context );
39
+		parent::__construct($context);
40 40
 	}
41 41
 
42 42
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 * @return mixed Returns the value of the called method
49 49
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
50 50
 	 */
51
-	public function __call( $name, array $param )
51
+	public function __call($name, array $param)
52 52
 	{
53
-		return @call_user_func_array( array( $this->controller, $name ), $param );
53
+		return @call_user_func_array(array($this->controller, $name), $param);
54 54
 	}
55 55
 
56 56
 
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
62 62
 	 * @since 2017.04
63 63
 	 */
64
-	public function addItem( array $values )
64
+	public function addItem(array $values)
65 65
 	{
66
-		return $this->controller->addItem( $values );
66
+		return $this->controller->addItem($values);
67 67
 	}
68 68
 
69 69
 
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
74 74
 	 * @since 2017.04
75 75
 	 */
76
-	public function createItem( array $values = [] )
76
+	public function createItem(array $values = [])
77 77
 	{
78
-		return $this->controller->createItem( $values );
78
+		return $this->controller->createItem($values);
79 79
 	}
80 80
 
81 81
 
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
 	 * @param string $id Unique customer ID
86 86
 	 * @since 2017.04
87 87
 	 */
88
-	public function deleteItem( $id )
88
+	public function deleteItem($id)
89 89
 	{
90
-		return $this->controller->deleteItem( $id );
90
+		return $this->controller->deleteItem($id);
91 91
 	}
92 92
 
93 93
 
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
100 100
 	 * @since 2017.04
101 101
 	 */
102
-	public function editItem( $id, array $values )
102
+	public function editItem($id, array $values)
103 103
 	{
104
-		return $this->controller->editItem( $id, $values );
104
+		return $this->controller->editItem($id, $values);
105 105
 	}
106 106
 
107 107
 
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item including the referenced domains items
114 114
 	 * @since 2017.04
115 115
 	 */
116
-	public function getItem( $id = null, array $domains = [] )
116
+	public function getItem($id = null, array $domains = [])
117 117
 	{
118
-		return $this->controller->getItem( $id, $domains );
118
+		return $this->controller->getItem($id, $domains);
119 119
 	}
120 120
 
121 121
 
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item including the referenced domains items
130 130
 	 * @since 2017.04
131 131
 	 */
132
-	public function findItem( $code, array $domains = [] )
132
+	public function findItem($code, array $domains = [])
133 133
 	{
134
-		return $this->controller->findItem( $code, $domains );
134
+		return $this->controller->findItem($code, $domains);
135 135
 	}
136 136
 
137 137
 
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
 	 * @param \Aimeos\MShop\Customer\Item\Iface Customer item
142 142
 	 * @since 2017.04
143 143
 	 */
144
-	public function saveItem( \Aimeos\MShop\Customer\Item\Iface $item )
144
+	public function saveItem(\Aimeos\MShop\Customer\Item\Iface $item)
145 145
 	{
146
-		return $this->controller->saveItem( $item );
146
+		return $this->controller->saveItem($item);
147 147
 	}
148 148
 
149 149
 
@@ -154,9 +154,9 @@  discard block
 block discarded – undo
154 154
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer address item
155 155
 	 * @since 2017.04
156 156
 	 */
157
-	public function addAddressItem( array $values )
157
+	public function addAddressItem(array $values)
158 158
 	{
159
-		return $this->controller->addAddressItem( $values );
159
+		return $this->controller->addAddressItem($values);
160 160
 	}
161 161
 
162 162
 
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
167 167
 	 * @since 2017.04
168 168
 	 */
169
-	public function createAddressItem( array $values = [] )
169
+	public function createAddressItem(array $values = [])
170 170
 	{
171
-		return $this->controller->createAddressItem( $values );
171
+		return $this->controller->createAddressItem($values);
172 172
 	}
173 173
 
174 174
 
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
 	 * @param string $id Unique customer address ID
179 179
 	 * @since 2017.04
180 180
 	 */
181
-	public function deleteAddressItem( $id )
181
+	public function deleteAddressItem($id)
182 182
 	{
183
-		$this->controller->deleteAddressItem( $id );
183
+		$this->controller->deleteAddressItem($id);
184 184
 	}
185 185
 
186 186
 
@@ -192,9 +192,9 @@  discard block
 block discarded – undo
192 192
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer address item
193 193
 	 * @since 2017.04
194 194
 	 */
195
-	public function editAddressItem( $id, array $values )
195
+	public function editAddressItem($id, array $values)
196 196
 	{
197
-		return $this->controller->editAddressItem( $id, $values );
197
+		return $this->controller->editAddressItem($id, $values);
198 198
 	}
199 199
 
200 200
 
@@ -205,9 +205,9 @@  discard block
 block discarded – undo
205 205
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
206 206
 	 * @since 2017.04
207 207
 	 */
208
-	public function getAddressItem( $id )
208
+	public function getAddressItem($id)
209 209
 	{
210
-		return $this->controller->getAddressItem( $id );
210
+		return $this->controller->getAddressItem($id);
211 211
 	}
212 212
 
213 213
 
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
 	 * @param \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
218 218
 	 * @since 2017.04
219 219
 	 */
220
-	public function saveAddressItem( \Aimeos\MShop\Customer\Item\Address\Iface $item )
220
+	public function saveAddressItem(\Aimeos\MShop\Customer\Item\Address\Iface $item)
221 221
 	{
222
-		$this->controller->saveAddressItem( $item );
222
+		$this->controller->saveAddressItem($item);
223 223
 	}
224 224
 
225 225
 
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Exception.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@
 block discarded – undo
32 32
 	 * @param \Exception $previous The previous exception used for the exception chaining.
33 33
 	 * @param array $list The associative list of errors and their messages when several errors occured
34 34
 	 */
35
-	public function __construct( $msg = '', $code = 0, \Exception $previous = null, array $list = [] )
35
+	public function __construct($msg = '', $code = 0, \Exception $previous = null, array $list = [])
36 36
 	{
37
-		parent::__construct( $msg, $code, $previous );
37
+		parent::__construct($msg, $code, $previous);
38 38
 
39 39
 		$this->list = $list;
40 40
 	}
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Locale/Iface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 * @return \Aimeos\MShop\Locale\Item\Iface Locale item including the referenced domains items
37 37
 	 * @since 2017.03
38 38
 	 */
39
-	public function getItem( $id, array $domains = [] );
39
+	public function getItem($id, array $domains = []);
40 40
 
41 41
 
42 42
 	/**
@@ -48,5 +48,5 @@  discard block
 block discarded – undo
48 48
 	 * @return array Ordered list of locale items implementing \Aimeos\MShop\Locale\Item\Iface
49 49
 	 * @since 2017.03
50 50
 	 */
51
-	public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = [], &$total = null );
51
+	public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = [], &$total = null);
52 52
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Customer/Iface.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
27 27
 	 * @since 2017.04
28 28
 	 */
29
-	public function addItem( array $values );
29
+	public function addItem(array $values);
30 30
 
31 31
 
32 32
 	/**
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
36 36
 	 * @since 2017.04
37 37
 	 */
38
-	public function createItem( array $values = [] );
38
+	public function createItem(array $values = []);
39 39
 
40 40
 
41 41
 	/**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 * @param string $id Unique customer ID
45 45
 	 * @since 2017.04
46 46
 	 */
47
-	public function deleteItem( $id );
47
+	public function deleteItem($id);
48 48
 
49 49
 
50 50
 	/**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item
56 56
 	 * @since 2017.04
57 57
 	 */
58
-	public function editItem( $id, array $values );
58
+	public function editItem($id, array $values);
59 59
 
60 60
 
61 61
 	/**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item including the referenced domains items
67 67
 	 * @since 2017.04
68 68
 	 */
69
-	public function getItem( $id = null, array $domains = [] );
69
+	public function getItem($id = null, array $domains = []);
70 70
 
71 71
 
72 72
 	/**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer item including the referenced domains items
80 80
 	 * @since 2017.04
81 81
 	 */
82
-	public function findItem( $code, array $domains = [] );
82
+	public function findItem($code, array $domains = []);
83 83
 
84 84
 
85 85
 	/**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item including the generated ID
90 90
 	 * @since 2017.04
91 91
 	 */
92
-	public function saveItem( \Aimeos\MShop\Customer\Item\Iface $item );
92
+	public function saveItem(\Aimeos\MShop\Customer\Item\Iface $item);
93 93
 
94 94
 
95 95
 	/**
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer address item
100 100
 	 * @since 2017.04
101 101
 	 */
102
-	public function addAddressItem( array $values );
102
+	public function addAddressItem(array $values);
103 103
 
104 104
 
105 105
 	/**
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
109 109
 	 * @since 2017.04
110 110
 	 */
111
-	public function createAddressItem( array $values = [] );
111
+	public function createAddressItem(array $values = []);
112 112
 
113 113
 
114 114
 	/**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 * @param string $id Unique customer address ID
118 118
 	 * @since 2017.04
119 119
 	 */
120
-	public function deleteAddressItem( $id );
120
+	public function deleteAddressItem($id);
121 121
 
122 122
 
123 123
 	/**
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 	 * @return \Aimeos\MShop\Customer\Item\Iface Customer address item
129 129
 	 * @since 2017.04
130 130
 	 */
131
-	public function editAddressItem( $id, array $values );
131
+	public function editAddressItem($id, array $values);
132 132
 
133 133
 
134 134
 	/**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
139 139
 	 * @since 2017.04
140 140
 	 */
141
-	public function getAddressItem( $id );
141
+	public function getAddressItem($id);
142 142
 
143 143
 
144 144
 	/**
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item including the generated ID
149 149
 	 * @since 2017.04
150 150
 	 */
151
-	public function saveAddressItem( \Aimeos\MShop\Customer\Item\Address\Iface $item );
151
+	public function saveAddressItem(\Aimeos\MShop\Customer\Item\Address\Iface $item);
152 152
 
153 153
 	/**
154 154
 	 * Creates and returns a new list item object
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * @return \Aimeos\MShop\Common\Item\Lists\Iface Customer lists item
158 158
 	 * @since 2017.06
159 159
 	 */
160
-	public function addListItem( array $values );
160
+	public function addListItem(array $values);
161 161
 
162 162
 	/**
163 163
 	 * Returns a new customer lists filter criteria object
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	 * @param string $id Unique customer address ID
174 174
 	 * @since 2017.06
175 175
 	 */
176
-	public function deleteListItem( $id );
176
+	public function deleteListItem($id);
177 177
 
178 178
 	/**
179 179
 	 * Saves a modified customer lists item object
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	 * @return \Aimeos\MShop\Common\Item\Lists\Iface Customer lists item
184 184
 	 * @since 2017.06
185 185
 	 */
186
-	public function editListItem( $id, array $values );
186
+	public function editListItem($id, array $values);
187 187
 
188 188
 	/**
189 189
 	 * Returns the customer item for the given customer ID
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	 * @return \Aimeos\MShop\Customer\Item\Address\Iface Customer address item
193 193
 	 * @since 2017.06
194 194
 	 */
195
-	public function getListItem( $id );
195
+	public function getListItem($id);
196 196
 
197 197
 	/**
198 198
 	 * Returns the customer lists items filtered by the given criteria
@@ -202,5 +202,5 @@  discard block
 block discarded – undo
202 202
 	 * @return \Aimeos\MShop\Common\Item\Lists\Iface[] Customer list items
203 203
 	 * @since 2017.06
204 204
 	 */
205
-	public function searchListItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null );
205
+	public function searchListItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null);
206 206
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Basket/Iface.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,6 @@
 block discarded – undo
150 150
 	 * Adds the delivery/payment service item based on the service ID.
151 151
 	 *
152 152
 	 * @param string $type Service type code like 'payment' or 'delivery'
153
-	 * @param string $id|null Unique ID of the service item or null to remove it
154 153
 	 * @param array $attributes Associative list of key/value pairs containing the attributes selected or
155 154
 	 * 	entered by the customer when choosing one of the delivery or payment options
156 155
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If there is no price to the service item attached
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 * @param string $type Basket type
51 51
 	 * @return \Aimeos\Controller\Frontend\Basket\Iface Basket frontend object
52 52
 	 */
53
-	public function setType( $type );
53
+	public function setType($type);
54 54
 
55 55
 
56 56
 	/**
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @param boolean $default True to add default criteria (user logged in), false if not
70 70
 	 * @return \Aimeos\MShop\Order\Item\Base\Iface Order base object including the given parts
71 71
 	 */
72
-	public function load( $id, $parts = \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL, $default = true );
72
+	public function load($id, $parts = \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL, $default = true);
73 73
 
74 74
 
75 75
 	/**
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If the product isn't available
89 89
 	 * @return void
90 90
 	 */
91
-	public function addProduct( $prodid, $quantity = 1, $stocktype = 'default', array $variantAttributeIds = [],
92
-		array $configAttributeIds = [], array $hiddenAttributeIds = [], array $customAttributeValues = [] );
91
+	public function addProduct($prodid, $quantity = 1, $stocktype = 'default', array $variantAttributeIds = [],
92
+		array $configAttributeIds = [], array $hiddenAttributeIds = [], array $customAttributeValues = []);
93 93
 
94 94
 
95 95
 	/**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 * @param integer $position Position number (key) of the order product item
99 99
 	 * @return void
100 100
 	 */
101
-	public function deleteProduct( $position );
101
+	public function deleteProduct($position);
102 102
 
103 103
 
104 104
 	/**
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 * @param array $configAttributeCodes Codes of the product config attributes that should be REMOVED
110 110
 	 * @return void
111 111
 	 */
112
-	public function editProduct( $position, $quantity, array $configAttributeCodes = [] );
112
+	public function editProduct($position, $quantity, array $configAttributeCodes = []);
113 113
 
114 114
 
115 115
 	/**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception if the coupon code is invalid or not allowed
120 120
 	 * @return void
121 121
 	 */
122
-	public function addCoupon( $code );
122
+	public function addCoupon($code);
123 123
 
124 124
 
125 125
 	/**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception if the coupon code is invalid
130 130
 	 * @return void
131 131
 	 */
132
-	public function deleteCoupon( $code );
132
+	public function deleteCoupon($code);
133 133
 
134 134
 
135 135
 	/**
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 * 	if one of the keys is invalid when using an array with key/value pairs
142 142
 	 * @return void
143 143
 	 */
144
-	public function setAddress( $type, $value );
144
+	public function setAddress($type, $value);
145 145
 
146 146
 
147 147
 	/**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	 * 	entered by the customer when choosing one of the delivery or payment options
154 154
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If there is no price to the service item attached
155 155
 	 */
156
-	public function addService( $type, $id, array $attributes = [] );
156
+	public function addService($type, $id, array $attributes = []);
157 157
 
158 158
 
159 159
 	/**
@@ -161,5 +161,5 @@  discard block
 block discarded – undo
161 161
 	 *
162 162
 	 * @param string $type Service type code like 'payment' or 'delivery'
163 163
 	 */
164
-	public function deleteService( $type );
164
+	public function deleteService($type);
165 165
 }
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Basket/Standard.php 3 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,6 @@
 block discarded – undo
150 150
 	 * Adds the delivery/payment service item based on the service ID.
151 151
 	 *
152 152
 	 * @param string $type Service type code like 'payment' or 'delivery'
153
-	 * @param string $id|null Unique ID of the service item or null to remove it
154 153
 	 * @param array $attributes Associative list of key/value pairs containing the attributes selected or
155 154
 	 * 	entered by the customer when choosing one of the delivery or payment options
156 155
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If there is no price to the service item attached
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -410,16 +410,13 @@
 block discarded – undo
410 410
 		if( $value instanceof \Aimeos\MShop\Common\Item\Address\Iface )
411 411
 		{
412 412
 			$this->get()->setAddress( $address->copyFrom( $value ), $type );
413
-		}
414
-		else if( is_array( $value ) )
413
+		} else if( is_array( $value ) )
415 414
 		{
416 415
 			$this->get()->setAddress( $this->setAddressFromArray( $address, $value ), $type );
417
-		}
418
-		else if( $value === null )
416
+		} else if( $value === null )
419 417
 		{
420 418
 			$this->get()->deleteAddress( $type );
421
-		}
422
-		else
419
+		} else
423 420
 		{
424 421
 			$msg = $context->getI18n()->dt( 'controller/frontend', 'Invalid value for address type "%1$s"' );
425 422
 			throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( $msg, $type ) );
Please login to merge, or discard this patch.
Spacing   +130 added lines, -130 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Object storing the required instances for manaing databases
34 34
 	 *  connections, logger, session, etc.
35 35
 	 */
36
-	public function __construct( \Aimeos\MShop\Context\Item\Iface $context )
36
+	public function __construct(\Aimeos\MShop\Context\Item\Iface $context)
37 37
 	{
38
-		parent::__construct( $context );
38
+		parent::__construct($context);
39 39
 
40
-		$this->domainManager = \Aimeos\MShop::create( $context, 'order/base' );
40
+		$this->domainManager = \Aimeos\MShop::create($context, 'order/base');
41 41
 	}
42 42
 
43 43
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	public function clear()
50 50
 	{
51 51
 		$this->baskets[$this->type] = $this->domainManager->createItem();
52
-		$this->domainManager->setSession( $this->baskets[$this->type], $this->type );
52
+		$this->domainManager->setSession($this->baskets[$this->type], $this->type);
53 53
 
54 54
 		return $this;
55 55
 	}
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	public function get()
64 64
 	{
65
-		if( !isset( $this->baskets[$this->type] ) )
65
+		if (!isset($this->baskets[$this->type]))
66 66
 		{
67
-			$this->baskets[$this->type] = $this->domainManager->getSession( $this->type );
68
-			$this->checkLocale( $this->baskets[$this->type]->getLocale(), $this->type );
67
+			$this->baskets[$this->type] = $this->domainManager->getSession($this->type);
68
+			$this->checkLocale($this->baskets[$this->type]->getLocale(), $this->type);
69 69
 		}
70 70
 
71 71
 		return $this->baskets[$this->type];
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function save()
81 81
 	{
82
-		if( isset( $this->baskets[$this->type] ) && $this->baskets[$this->type]->isModified() ) {
83
-			$this->domainManager->setSession( $this->baskets[$this->type], $this->type );
82
+		if (isset($this->baskets[$this->type]) && $this->baskets[$this->type]->isModified()) {
83
+			$this->domainManager->setSession($this->baskets[$this->type], $this->type);
84 84
 		}
85 85
 
86 86
 		return $this;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 * @param string $type Basket type
94 94
 	 * @return \Aimeos\Controller\Frontend\Basket\Iface Basket frontend object
95 95
 	 */
96
-	public function setType( $type )
96
+	public function setType($type)
97 97
 	{
98 98
 		$this->type = $type;
99 99
 		return $this;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		 * @category Developer
128 128
 		 * @see controller/frontend/basket/limit-seconds
129 129
 		 */
130
-		$count = $config->get( 'controller/frontend/basket/limit-count', 5 );
130
+		$count = $config->get('controller/frontend/basket/limit-count', 5);
131 131
 
132 132
 		/** controller/frontend/basket/limit-seconds
133 133
 		 * Order limitation time frame in seconds
@@ -145,34 +145,34 @@  discard block
 block discarded – undo
145 145
 		 * @category Developer
146 146
 		 * @see controller/frontend/basket/limit-count
147 147
 		 */
148
-		$seconds = $config->get( 'controller/frontend/basket/limit-seconds', 300 );
148
+		$seconds = $config->get('controller/frontend/basket/limit-seconds', 300);
149 149
 
150 150
 		$search = $this->domainManager->createSearch();
151 151
 		$expr = [
152
-			$search->compare( '==', 'order.base.editor', $context->getEditor() ),
153
-			$search->compare( '>=', 'order.base.ctime', date( 'Y-m-d H:i:s', time() - $seconds ) ),
152
+			$search->compare('==', 'order.base.editor', $context->getEditor()),
153
+			$search->compare('>=', 'order.base.ctime', date('Y-m-d H:i:s', time() - $seconds)),
154 154
 		];
155
-		$search->setConditions( $search->combine( '&&', $expr ) );
156
-		$search->setSlice( 0, 0 );
155
+		$search->setConditions($search->combine('&&', $expr));
156
+		$search->setSlice(0, 0);
157 157
 
158
-		$this->domainManager->searchItems( $search, [], $total );
158
+		$this->domainManager->searchItems($search, [], $total);
159 159
 
160
-		if( $total > $count )
160
+		if ($total > $count)
161 161
 		{
162
-			$msg = $context->getI18n()->dt( 'controller/frontend', 'Temporary order limit reached' );
163
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( $msg );
162
+			$msg = $context->getI18n()->dt('controller/frontend', 'Temporary order limit reached');
163
+			throw new \Aimeos\Controller\Frontend\Basket\Exception($msg);
164 164
 		}
165 165
 
166 166
 
167 167
 		$basket = $this->get()->finish();
168
-		$basket->setCustomerId( (string) $context->getUserId() );
168
+		$basket->setCustomerId((string) $context->getUserId());
169 169
 
170 170
 		$this->domainManager->begin();
171
-		$this->domainManager->store( $basket );
171
+		$this->domainManager->store($basket);
172 172
 		$this->domainManager->commit();
173 173
 
174 174
 		$this->save(); // for reusing unpaid orders, might have side effects (!)
175
-		$this->createSubscriptions( $basket );
175
+		$this->createSubscriptions($basket);
176 176
 
177 177
 		return $basket;
178 178
 	}
@@ -186,9 +186,9 @@  discard block
 block discarded – undo
186 186
 	 * @param boolean $default True to add default criteria (user logged in), false if not
187 187
 	 * @return \Aimeos\MShop\Order\Item\Base\Iface Order base object including the given parts
188 188
 	 */
189
-	public function load( $id, $parts = \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL, $default = true )
189
+	public function load($id, $parts = \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL, $default = true)
190 190
 	{
191
-		return $this->domainManager->load( $id, $parts, false, $default );
191
+		return $this->domainManager->load($id, $parts, false, $default);
192 192
 	}
193 193
 
194 194
 
@@ -207,34 +207,34 @@  discard block
 block discarded – undo
207 207
 	 * @param string $stocktype Unique code of the stock type to deliver the products from
208 208
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If the product isn't available
209 209
 	 */
210
-	public function addProduct( $prodid, $quantity = 1, $stocktype = 'default', array $variantAttributeIds = [],
211
-		array $configAttributeIds = [], array $hiddenAttributeIds = [], array $customAttributeValues = [] )
210
+	public function addProduct($prodid, $quantity = 1, $stocktype = 'default', array $variantAttributeIds = [],
211
+		array $configAttributeIds = [], array $hiddenAttributeIds = [], array $customAttributeValues = [])
212 212
 	{
213 213
 		$attributeMap = [
214
-			'custom' => array_keys( $customAttributeValues ),
215
-			'config' => array_keys( $configAttributeIds ),
214
+			'custom' => array_keys($customAttributeValues),
215
+			'config' => array_keys($configAttributeIds),
216 216
 		];
217
-		$this->checkListRef( $prodid, 'attribute', $attributeMap );
217
+		$this->checkListRef($prodid, 'attribute', $attributeMap);
218 218
 
219 219
 
220 220
 		$context = $this->getContext();
221
-		$productManager = \Aimeos\MShop::create( $context, 'product' );
221
+		$productManager = \Aimeos\MShop::create($context, 'product');
222 222
 
223
-		$productItem = $productManager->getItem( $prodid, ['attribute', 'media', 'supplier', 'price', 'product', 'text'], true );
224
-		$prices = $productItem->getRefItems( 'price', 'default', 'default' );
225
-		$hidden = $productItem->getRefItems( 'attribute', null, 'hidden' );
223
+		$productItem = $productManager->getItem($prodid, ['attribute', 'media', 'supplier', 'price', 'product', 'text'], true);
224
+		$prices = $productItem->getRefItems('price', 'default', 'default');
225
+		$hidden = $productItem->getRefItems('attribute', null, 'hidden');
226 226
 
227
-		$orderBaseProductItem = \Aimeos\MShop::create( $context, 'order/base/product' )->createItem();
228
-		$orderBaseProductItem->copyFrom( $productItem )->setQuantity( $quantity )->setStockType( $stocktype );
227
+		$orderBaseProductItem = \Aimeos\MShop::create($context, 'order/base/product')->createItem();
228
+		$orderBaseProductItem->copyFrom($productItem)->setQuantity($quantity)->setStockType($stocktype);
229 229
 
230
-		$custAttr = $this->getOrderProductAttributes( 'custom', array_keys( $customAttributeValues ), $customAttributeValues );
231
-		$confAttr = $this->getOrderProductAttributes( 'config', array_keys( $configAttributeIds ), [], $configAttributeIds );
232
-		$attr = array_merge( $custAttr, $confAttr, $this->getOrderProductAttributes( 'hidden', array_keys( $hidden ) ) );
230
+		$custAttr = $this->getOrderProductAttributes('custom', array_keys($customAttributeValues), $customAttributeValues);
231
+		$confAttr = $this->getOrderProductAttributes('config', array_keys($configAttributeIds), [], $configAttributeIds);
232
+		$attr = array_merge($custAttr, $confAttr, $this->getOrderProductAttributes('hidden', array_keys($hidden)));
233 233
 
234
-		$orderBaseProductItem->setAttributeItems( $attr );
235
-		$orderBaseProductItem->setPrice( $this->calcPrice( $orderBaseProductItem, $prices, $quantity ) );
234
+		$orderBaseProductItem->setAttributeItems($attr);
235
+		$orderBaseProductItem->setPrice($this->calcPrice($orderBaseProductItem, $prices, $quantity));
236 236
 
237
-		$this->get()->addProduct( $orderBaseProductItem );
237
+		$this->get()->addProduct($orderBaseProductItem);
238 238
 		$this->save();
239 239
 	}
240 240
 
@@ -244,17 +244,17 @@  discard block
 block discarded – undo
244 244
 	 *
245 245
 	 * @param integer $position Position number (key) of the order product item
246 246
 	 */
247
-	public function deleteProduct( $position )
247
+	public function deleteProduct($position)
248 248
 	{
249
-		$product = $this->get()->getProduct( $position );
249
+		$product = $this->get()->getProduct($position);
250 250
 
251
-		if( $product->getFlags() === \Aimeos\MShop\Order\Item\Base\Product\Base::FLAG_IMMUTABLE )
251
+		if ($product->getFlags() === \Aimeos\MShop\Order\Item\Base\Product\Base::FLAG_IMMUTABLE)
252 252
 		{
253
-			$msg = $this->getContext()->getI18n()->dt( 'controller/frontend', 'Basket item at position "%1$d" cannot be deleted manually' );
254
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( $msg, $position ) );
253
+			$msg = $this->getContext()->getI18n()->dt('controller/frontend', 'Basket item at position "%1$d" cannot be deleted manually');
254
+			throw new \Aimeos\Controller\Frontend\Basket\Exception(sprintf($msg, $position));
255 255
 		}
256 256
 
257
-		$this->get()->deleteProduct( $position );
257
+		$this->get()->deleteProduct($position);
258 258
 		$this->save();
259 259
 	}
260 260
 
@@ -266,32 +266,32 @@  discard block
 block discarded – undo
266 266
 	 * @param integer $quantity New quantiy of the product item
267 267
 	 * @param string[] $configAttributeCodes Codes of the product config attributes that should be REMOVED
268 268
 	 */
269
-	public function editProduct( $position, $quantity, array $configAttributeCodes = [] )
269
+	public function editProduct($position, $quantity, array $configAttributeCodes = [])
270 270
 	{
271
-		$product = $this->get()->getProduct( $position );
271
+		$product = $this->get()->getProduct($position);
272 272
 
273
-		if( $product->getFlags() & \Aimeos\MShop\Order\Item\Base\Product\Base::FLAG_IMMUTABLE )
273
+		if ($product->getFlags() & \Aimeos\MShop\Order\Item\Base\Product\Base::FLAG_IMMUTABLE)
274 274
 		{
275
-			$msg = $this->getContext()->getI18n()->dt( 'controller/frontend', 'Basket item at position "%1$d" cannot be changed' );
276
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( $msg, $position ) );
275
+			$msg = $this->getContext()->getI18n()->dt('controller/frontend', 'Basket item at position "%1$d" cannot be changed');
276
+			throw new \Aimeos\Controller\Frontend\Basket\Exception(sprintf($msg, $position));
277 277
 		}
278 278
 
279
-		$product->setQuantity( $quantity );
279
+		$product->setQuantity($quantity);
280 280
 
281 281
 		$attributes = $product->getAttributeItems();
282
-		foreach( $attributes as $key => $attribute )
282
+		foreach ($attributes as $key => $attribute)
283 283
 		{
284
-			if( in_array( $attribute->getCode(), $configAttributeCodes ) ) {
285
-				unset( $attributes[$key] );
284
+			if (in_array($attribute->getCode(), $configAttributeCodes)) {
285
+				unset($attributes[$key]);
286 286
 			}
287 287
 		}
288
-		$product->setAttributeItems( $attributes );
288
+		$product->setAttributeItems($attributes);
289 289
 
290
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'product' );
291
-		$productItem = $manager->findItem( $product->getProductCode(), array( 'price', 'text' ), true );
292
-		$product->setPrice( $this->calcPrice( $product, $productItem->getRefItems( 'price', 'default' ), $quantity ) );
290
+		$manager = \Aimeos\MShop::create($this->getContext(), 'product');
291
+		$productItem = $manager->findItem($product->getProductCode(), array('price', 'text'), true);
292
+		$product->setPrice($this->calcPrice($product, $productItem->getRefItems('price', 'default'), $quantity));
293 293
 
294
-		$this->get()->editProduct( $product, $position );
294
+		$this->get()->editProduct($product, $position);
295 295
 
296 296
 		$this->save();
297 297
 	}
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 	 * @param string $code Coupon code entered by the user
304 304
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception if the coupon code is invalid or not allowed
305 305
 	 */
306
-	public function addCoupon( $code )
306
+	public function addCoupon($code)
307 307
 	{
308 308
 		$context = $this->getContext();
309 309
 
@@ -323,44 +323,44 @@  discard block
 block discarded – undo
323 323
 		 * @category User
324 324
 		 * @category Developer
325 325
 		 */
326
-		$allowed = $context->getConfig()->get( 'controller/frontend/basket/standard/coupon/allowed', 1 );
326
+		$allowed = $context->getConfig()->get('controller/frontend/basket/standard/coupon/allowed', 1);
327 327
 
328
-		if( $allowed <= count( $this->get()->getCoupons() ) )
328
+		if ($allowed <= count($this->get()->getCoupons()))
329 329
 		{
330
-			$msg = $context->getI18n()->dt( 'controller/frontend', 'Number of coupon codes exceeds the limit' );
331
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( $msg );
330
+			$msg = $context->getI18n()->dt('controller/frontend', 'Number of coupon codes exceeds the limit');
331
+			throw new \Aimeos\Controller\Frontend\Basket\Exception($msg);
332 332
 		}
333 333
 
334 334
 
335
-		$manager = \Aimeos\MShop::create( $context, 'coupon' );
336
-		$codeManager = \Aimeos\MShop::create( $context, 'coupon/code' );
335
+		$manager = \Aimeos\MShop::create($context, 'coupon');
336
+		$codeManager = \Aimeos\MShop::create($context, 'coupon/code');
337 337
 
338
-		$search = $manager->createSearch( true )->setSlice( 0, 1 );
338
+		$search = $manager->createSearch(true)->setSlice(0, 1);
339 339
 		$expr = [
340
-			$search->compare( '==', 'coupon.code.code', $code ),
341
-			$codeManager->createSearch( true )->getConditions(),
340
+			$search->compare('==', 'coupon.code.code', $code),
341
+			$codeManager->createSearch(true)->getConditions(),
342 342
 			$search->getConditions(),
343 343
 		];
344
-		$search->setConditions( $search->combine( '&&', $expr ) );
344
+		$search->setConditions($search->combine('&&', $expr));
345 345
 
346
-		$result = $manager->searchItems( $search );
346
+		$result = $manager->searchItems($search);
347 347
 
348
-		if( ( $item = reset( $result ) ) === false )
348
+		if (($item = reset($result)) === false)
349 349
 		{
350
-			$msg = sprintf( $context->getI18n()->dt( 'controller/frontend', 'Coupon code "%1$s" is invalid or not available any more' ), $code );
351
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( $msg );
350
+			$msg = sprintf($context->getI18n()->dt('controller/frontend', 'Coupon code "%1$s" is invalid or not available any more'), $code);
351
+			throw new \Aimeos\Controller\Frontend\Basket\Exception($msg);
352 352
 		}
353 353
 
354 354
 
355
-		$provider = $manager->getProvider( $item, $code );
355
+		$provider = $manager->getProvider($item, $code);
356 356
 
357
-		if( $provider->isAvailable( $this->get() ) !== true )
357
+		if ($provider->isAvailable($this->get()) !== true)
358 358
 		{
359
-			$msg = sprintf( $context->getI18n()->dt( 'controller/frontend', 'Requirements for coupon code "%1$s" aren\'t met' ), $code );
360
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( $msg );
359
+			$msg = sprintf($context->getI18n()->dt('controller/frontend', 'Requirements for coupon code "%1$s" aren\'t met'), $code);
360
+			throw new \Aimeos\Controller\Frontend\Basket\Exception($msg);
361 361
 		}
362 362
 
363
-		$provider->addCoupon( $this->get() );
363
+		$provider->addCoupon($this->get());
364 364
 		$this->save();
365 365
 	}
366 366
 
@@ -371,24 +371,24 @@  discard block
 block discarded – undo
371 371
 	 * @param string $code Coupon code entered by the user
372 372
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception if the coupon code is invalid
373 373
 	 */
374
-	public function deleteCoupon( $code )
374
+	public function deleteCoupon($code)
375 375
 	{
376 376
 		$context = $this->getContext();
377
-		$manager = \Aimeos\MShop::create( $context, 'coupon' );
377
+		$manager = \Aimeos\MShop::create($context, 'coupon');
378 378
 
379 379
 		$search = $manager->createSearch();
380
-		$search->setConditions( $search->compare( '==', 'coupon.code.code', $code ) );
381
-		$search->setSlice( 0, 1 );
380
+		$search->setConditions($search->compare('==', 'coupon.code.code', $code));
381
+		$search->setSlice(0, 1);
382 382
 
383
-		$result = $manager->searchItems( $search );
383
+		$result = $manager->searchItems($search);
384 384
 
385
-		if( ( $item = reset( $result ) ) === false )
385
+		if (($item = reset($result)) === false)
386 386
 		{
387
-			$msg = $context->getI18n()->dt( 'controller/frontend', 'Coupon code "%1$s" is invalid' );
388
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( $msg, $code ) );
387
+			$msg = $context->getI18n()->dt('controller/frontend', 'Coupon code "%1$s" is invalid');
388
+			throw new \Aimeos\Controller\Frontend\Basket\Exception(sprintf($msg, $code));
389 389
 		}
390 390
 
391
-		$manager->getProvider( $item, $code )->deleteCoupon( $this->get() );
391
+		$manager->getProvider($item, $code)->deleteCoupon($this->get());
392 392
 		$this->save();
393 393
 	}
394 394
 
@@ -401,28 +401,28 @@  discard block
 block discarded – undo
401 401
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If the billing or delivery address is not of any required type of
402 402
 	 * 	if one of the keys is invalid when using an array with key/value pairs
403 403
 	 */
404
-	public function setAddress( $type, $value )
404
+	public function setAddress($type, $value)
405 405
 	{
406 406
 		$context = $this->getContext();
407
-		$address = \Aimeos\MShop::create( $context, 'order/base/address' )->createItem();
408
-		$address->setType( $type );
407
+		$address = \Aimeos\MShop::create($context, 'order/base/address')->createItem();
408
+		$address->setType($type);
409 409
 
410
-		if( $value instanceof \Aimeos\MShop\Common\Item\Address\Iface )
410
+		if ($value instanceof \Aimeos\MShop\Common\Item\Address\Iface)
411 411
 		{
412
-			$this->get()->setAddress( $address->copyFrom( $value ), $type );
412
+			$this->get()->setAddress($address->copyFrom($value), $type);
413 413
 		}
414
-		else if( is_array( $value ) )
414
+		else if (is_array($value))
415 415
 		{
416
-			$this->get()->setAddress( $this->setAddressFromArray( $address, $value ), $type );
416
+			$this->get()->setAddress($this->setAddressFromArray($address, $value), $type);
417 417
 		}
418
-		else if( $value === null )
418
+		else if ($value === null)
419 419
 		{
420
-			$this->get()->deleteAddress( $type );
420
+			$this->get()->deleteAddress($type);
421 421
 		}
422 422
 		else
423 423
 		{
424
-			$msg = $context->getI18n()->dt( 'controller/frontend', 'Invalid value for address type "%1$s"' );
425
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( sprintf( $msg, $type ) );
424
+			$msg = $context->getI18n()->dt('controller/frontend', 'Invalid value for address type "%1$s"');
425
+			throw new \Aimeos\Controller\Frontend\Basket\Exception(sprintf($msg, $type));
426 426
 		}
427 427
 
428 428
 		$this->save();
@@ -438,42 +438,42 @@  discard block
 block discarded – undo
438 438
 	 * 	entered by the customer when choosing one of the delivery or payment options
439 439
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If there is no price to the service item attached
440 440
 	 */
441
-	public function addService( $type, $id, array $attributes = [] )
441
+	public function addService($type, $id, array $attributes = [])
442 442
 	{
443 443
 		$context = $this->getContext();
444 444
 
445
-		$serviceManager = \Aimeos\MShop::create( $context, 'service' );
446
-		$serviceItem = $serviceManager->getItem( $id, array( 'media', 'price', 'text' ) );
445
+		$serviceManager = \Aimeos\MShop::create($context, 'service');
446
+		$serviceItem = $serviceManager->getItem($id, array('media', 'price', 'text'));
447 447
 
448
-		$provider = $serviceManager->getProvider( $serviceItem, $serviceItem->getType() );
449
-		$result = $provider->checkConfigFE( $attributes );
450
-		$unknown = array_diff_key( $attributes, $result );
448
+		$provider = $serviceManager->getProvider($serviceItem, $serviceItem->getType());
449
+		$result = $provider->checkConfigFE($attributes);
450
+		$unknown = array_diff_key($attributes, $result);
451 451
 
452
-		if( count( $unknown ) > 0 )
452
+		if (count($unknown) > 0)
453 453
 		{
454
-			$msg = $context->getI18n()->dt( 'controller/frontend', 'Unknown attributes "%1$s"' );
455
-			$msg = sprintf( $msg, implode( '","', array_keys( $unknown ) ) );
456
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( $msg );
454
+			$msg = $context->getI18n()->dt('controller/frontend', 'Unknown attributes "%1$s"');
455
+			$msg = sprintf($msg, implode('","', array_keys($unknown)));
456
+			throw new \Aimeos\Controller\Frontend\Basket\Exception($msg);
457 457
 		}
458 458
 
459
-		foreach( $result as $key => $value )
459
+		foreach ($result as $key => $value)
460 460
 		{
461
-			if( $value !== null ) {
462
-				throw new \Aimeos\Controller\Frontend\Basket\Exception( $value );
461
+			if ($value !== null) {
462
+				throw new \Aimeos\Controller\Frontend\Basket\Exception($value);
463 463
 			}
464 464
 		}
465 465
 
466
-		$orderBaseServiceManager = \Aimeos\MShop::create( $context, 'order/base/service' );
466
+		$orderBaseServiceManager = \Aimeos\MShop::create($context, 'order/base/service');
467 467
 		$orderServiceItem = $orderBaseServiceManager->createItem();
468
-		$orderServiceItem->copyFrom( $serviceItem );
468
+		$orderServiceItem->copyFrom($serviceItem);
469 469
 
470 470
 		// remove service rebate of original price
471
-		$price = $provider->calcPrice( $this->get() )->setRebate( '0.00' );
472
-		$orderServiceItem->setPrice( $price );
471
+		$price = $provider->calcPrice($this->get())->setRebate('0.00');
472
+		$orderServiceItem->setPrice($price);
473 473
 
474
-		$provider->setConfigFE( $orderServiceItem, $attributes );
474
+		$provider->setConfigFE($orderServiceItem, $attributes);
475 475
 
476
-		$this->get()->addService( $orderServiceItem, $type );
476
+		$this->get()->addService($orderServiceItem, $type);
477 477
 		$this->save();
478 478
 	}
479 479
 
@@ -483,9 +483,9 @@  discard block
 block discarded – undo
483 483
 	 *
484 484
 	 * @param string $type Service type code like 'payment' or 'delivery'
485 485
 	 */
486
-	public function deleteService( $type )
486
+	public function deleteService($type)
487 487
 	{
488
-		$this->get()->deleteService( $type );
488
+		$this->get()->deleteService($type);
489 489
 		$this->save();
490 490
 	}
491 491
 
@@ -499,18 +499,18 @@  discard block
 block discarded – undo
499 499
 	 * @return \Aimeos\MShop\Order\Item\Base\Address\Iface Updated address item
500 500
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception
501 501
 	 */
502
-	protected function setAddressFromArray( \Aimeos\MShop\Order\Item\Base\Address\Iface $address, array $map )
502
+	protected function setAddressFromArray(\Aimeos\MShop\Order\Item\Base\Address\Iface $address, array $map)
503 503
 	{
504
-		foreach( $map as $key => $value ) {
505
-			$map[$key] = strip_tags( $value ); // prevent XSS
504
+		foreach ($map as $key => $value) {
505
+			$map[$key] = strip_tags($value); // prevent XSS
506 506
 		}
507 507
 
508
-		$address = $address->fromArray( $map );
508
+		$address = $address->fromArray($map);
509 509
 
510
-		if( count( $map ) > 0 )
510
+		if (count($map) > 0)
511 511
 		{
512
-			$msg = $this->getContext()->getI18n()->dt( 'controller/frontend', 'Invalid address properties, please check your input' );
513
-			throw new \Aimeos\Controller\Frontend\Basket\Exception( $msg, 0, null, $map );
512
+			$msg = $this->getContext()->getI18n()->dt('controller/frontend', 'Invalid address properties, please check your input');
513
+			throw new \Aimeos\Controller\Frontend\Basket\Exception($msg, 0, null, $map);
514 514
 		}
515 515
 
516 516
 		return $address;
Please login to merge, or discard this patch.
controller/frontend/src/Controller/Frontend/Basket/Decorator/Base.php 2 patches
Doc Comments   +2 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 	/**
63 63
 	 * Empties the basket and removing all products, addresses, services, etc.
64
-	 * @return void
64
+	 * @return Base
65 65
 	 */
66 66
 	public function clear()
67 67
 	{
@@ -134,11 +134,6 @@  discard block
 block discarded – undo
134 134
 	 *
135 135
 	 * @param string $prodid ID of the base product to add
136 136
 	 * @param integer $quantity Amount of products that should by added
137
-	 * @param array $options Possible options are: 'stock'=>true|false and 'variant'=>true|false
138
-	 * 	The 'stock'=>false option allows adding products without being in stock.
139
-	 * 	The 'variant'=>false option allows adding the selection product to the basket
140
-	 * 	instead of the specific sub-product if the variant-building attribute IDs
141
-	 * 	doesn't match a specific sub-product or if the attribute IDs are missing.
142 137
 	 * @param array $variantAttributeIds List of variant-building attribute IDs that identify a specific product
143 138
 	 * 	in a selection products
144 139
 	 * @param array $configAttributeIds  List of attribute IDs that doesn't identify a specific product in a
@@ -257,7 +252,7 @@  discard block
 block discarded – undo
257 252
 	/**
258 253
 	 * Returns the frontend controller
259 254
 	 *
260
-	 * @return \Aimeos\Controller\Frontend\Basket\Iface Frontend controller object
255
+	 * @return \Aimeos\Controller\Frontend\Iface Frontend controller object
261 256
 	 */
262 257
 	protected function getController()
263 258
 	{
Please login to merge, or discard this patch.
Spacing   +25 added lines, -25 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
-		\Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Basket\\Iface', $controller );
35
+		\Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Basket\\Iface', $controller);
36 36
 
37 37
 		$this->controller = $controller;
38 38
 
39
-		parent::__construct( $context );
39
+		parent::__construct($context);
40 40
 	}
41 41
 
42 42
 
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 	 * @return mixed Returns the value of the called method
49 49
 	 * @throws \Aimeos\Controller\Frontend\Exception If method call failed
50 50
 	 */
51
-	public function __call( $name, array $param )
51
+	public function __call($name, array $param)
52 52
 	{
53
-		return @call_user_func_array( array( $this->controller, $name ), $param );
53
+		return @call_user_func_array(array($this->controller, $name), $param);
54 54
 	}
55 55
 
56 56
 
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
 	 * @param string $type Basket type
93 93
 	 * @return \Aimeos\Controller\Frontend\Basket\Iface Basket frontend object
94 94
 	 */
95
-	public function setType( $type )
95
+	public function setType($type)
96 96
 	{
97
-		$this->controller->setType( $type );
97
+		$this->controller->setType($type);
98 98
 		return $this;
99 99
 	}
100 100
 
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
 	 * @param boolean $default True to add default criteria (user logged in), false if not
119 119
 	 * @return \Aimeos\MShop\Order\Item\Base\Iface Order base object including the given parts
120 120
 	 */
121
-	public function load( $id, $parts = \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL, $default = true )
121
+	public function load($id, $parts = \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL, $default = true)
122 122
 	{
123
-		return $this->controller->load( $id, $parts, $default );
123
+		return $this->controller->load($id, $parts, $default);
124 124
 	}
125 125
 
126 126
 
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If the product isn't available
146 146
 	 * @return void
147 147
 	 */
148
-	public function addProduct( $prodid, $quantity = 1, $stocktype = 'default', array $variantAttributeIds = [],
149
-		array $configAttributeIds = [], array $hiddenAttributeIds = [], array $customAttributeValues = [] )
148
+	public function addProduct($prodid, $quantity = 1, $stocktype = 'default', array $variantAttributeIds = [],
149
+		array $configAttributeIds = [], array $hiddenAttributeIds = [], array $customAttributeValues = [])
150 150
 	{
151 151
 		$this->controller->addProduct(
152 152
 			$prodid, $quantity, $stocktype, $variantAttributeIds,
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
 	 * @param integer $position Position number (key) of the order product item
162 162
 	 * @return void
163 163
 	 */
164
-	public function deleteProduct( $position )
164
+	public function deleteProduct($position)
165 165
 	{
166
-		$this->controller->deleteProduct( $position );
166
+		$this->controller->deleteProduct($position);
167 167
 	}
168 168
 
169 169
 
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
 	 * @param array $configAttributeCodes Codes of the product config attributes that should be REMOVED
176 176
 	 * @return void
177 177
 	 */
178
-	public function editProduct( $position, $quantity, array $configAttributeCodes = [] )
178
+	public function editProduct($position, $quantity, array $configAttributeCodes = [])
179 179
 	{
180
-		$this->controller->editProduct( $position, $quantity, $configAttributeCodes );
180
+		$this->controller->editProduct($position, $quantity, $configAttributeCodes);
181 181
 	}
182 182
 
183 183
 
@@ -188,9 +188,9 @@  discard block
 block discarded – undo
188 188
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception if the coupon code is invalid or not allowed
189 189
 	 * @return void
190 190
 	 */
191
-	public function addCoupon( $code )
191
+	public function addCoupon($code)
192 192
 	{
193
-		$this->controller->addCoupon( $code );
193
+		$this->controller->addCoupon($code);
194 194
 	}
195 195
 
196 196
 
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception if the coupon code is invalid
202 202
 	 * @return void
203 203
 	 */
204
-	public function deleteCoupon( $code )
204
+	public function deleteCoupon($code)
205 205
 	{
206
-		$this->controller->deleteCoupon( $code );
206
+		$this->controller->deleteCoupon($code);
207 207
 	}
208 208
 
209 209
 
@@ -216,9 +216,9 @@  discard block
 block discarded – undo
216 216
 	 * 	if one of the keys is invalid when using an array with key/value pairs
217 217
 	 * @return void
218 218
 	 */
219
-	public function setAddress( $type, $value )
219
+	public function setAddress($type, $value)
220 220
 	{
221
-		$this->controller->setAddress( $type, $value );
221
+		$this->controller->setAddress($type, $value);
222 222
 	}
223 223
 
224 224
 
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
 	 * @throws \Aimeos\Controller\Frontend\Basket\Exception If there is no price to the service item attached
233 233
 	 * @return void
234 234
 	 */
235
-	public function addService( $type, $id, array $attributes = [] )
235
+	public function addService($type, $id, array $attributes = [])
236 236
 	{
237
-		$this->controller->addService( $type, $id, $attributes );
237
+		$this->controller->addService($type, $id, $attributes);
238 238
 	}
239 239
 
240 240
 
@@ -243,9 +243,9 @@  discard block
 block discarded – undo
243 243
 	 *
244 244
 	 * @param string $type Service type code like 'payment' or 'delivery'
245 245
 	 */
246
-	public function deleteService( $type )
246
+	public function deleteService($type)
247 247
 	{
248
-		$this->controller->deleteService( $type );
248
+		$this->controller->deleteService($type);
249 249
 	}
250 250
 
251 251
 
Please login to merge, or discard this patch.