Completed
Push — master ( c7cb6f...a11e92 )
by Aimeos
10:48
created
lib/mshoplib/src/MShop/Common/Item/Lists/Standard.php 1 patch
Spacing   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function getParentId()
54 54
 	{
55
-		if( isset( $this->values[$this->prefix . 'parentid'] ) ) {
56
-			return (int) $this->values[$this->prefix . 'parentid'];
55
+		if( isset( $this->values[$this->prefix.'parentid'] ) ) {
56
+			return (int) $this->values[$this->prefix.'parentid'];
57 57
 		}
58 58
 
59 59
 		return null;
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	{
72 72
 		if( (string) $parentid !== $this->getParentId() )
73 73
 		{
74
-			$this->values[$this->prefix . 'parentid'] = (int) $parentid;
74
+			$this->values[$this->prefix.'parentid'] = (int) $parentid;
75 75
 			$this->setModified();
76 76
 		}
77 77
 
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	public function getDomain()
88 88
 	{
89
-		if( isset( $this->values[$this->prefix . 'domain'] ) ) {
90
-			return (string) $this->values[$this->prefix . 'domain'];
89
+		if( isset( $this->values[$this->prefix.'domain'] ) ) {
90
+			return (string) $this->values[$this->prefix.'domain'];
91 91
 		}
92 92
 
93 93
 		return '';
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	{
105 105
 		if( (string) $domain !== $this->getDomain() )
106 106
 		{
107
-			$this->values[$this->prefix . 'domain'] = (string) $domain;
107
+			$this->values[$this->prefix.'domain'] = (string) $domain;
108 108
 			$this->setModified();
109 109
 		}
110 110
 
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
 	 */
121 121
 	public function getRefId()
122 122
 	{
123
-		if( isset( $this->values[$this->prefix . 'refid'] ) ) {
124
-			return (string) $this->values[$this->prefix . 'refid'];
123
+		if( isset( $this->values[$this->prefix.'refid'] ) ) {
124
+			return (string) $this->values[$this->prefix.'refid'];
125 125
 		}
126 126
 
127 127
 		return '';
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	{
140 140
 		if( (string) $refid !== $this->getRefId() )
141 141
 		{
142
-			$this->values[$this->prefix . 'refid'] = (string) $refid;
142
+			$this->values[$this->prefix.'refid'] = (string) $refid;
143 143
 			$this->setModified();
144 144
 		}
145 145
 
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
 	 */
155 155
 	public function getDateStart()
156 156
 	{
157
-		if( isset( $this->values[$this->prefix . 'datestart'] ) ) {
158
-			return (string) $this->values[$this->prefix . 'datestart'];
157
+		if( isset( $this->values[$this->prefix.'datestart'] ) ) {
158
+			return (string) $this->values[$this->prefix.'datestart'];
159 159
 		}
160 160
 
161 161
 		return null;
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	{
173 173
 		if( (string) $date !== $this->getDateStart() )
174 174
 		{
175
-			$this->values[$this->prefix . 'datestart'] = $this->checkDateFormat( $date );
175
+			$this->values[$this->prefix.'datestart'] = $this->checkDateFormat( $date );
176 176
 			$this->setModified();
177 177
 		}
178 178
 
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
 	 */
188 188
 	public function getDateEnd()
189 189
 	{
190
-		if( isset( $this->values[$this->prefix . 'dateend'] ) ) {
191
-			return (string) $this->values[$this->prefix . 'dateend'];
190
+		if( isset( $this->values[$this->prefix.'dateend'] ) ) {
191
+			return (string) $this->values[$this->prefix.'dateend'];
192 192
 		}
193 193
 
194 194
 		return null;
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	{
206 206
 		if( (string) $date !== $this->getDateEnd() )
207 207
 		{
208
-			$this->values[$this->prefix . 'dateend'] = $this->checkDateFormat( $date );
208
+			$this->values[$this->prefix.'dateend'] = $this->checkDateFormat( $date );
209 209
 			$this->setModified();
210 210
 		}
211 211
 
@@ -220,8 +220,8 @@  discard block
 block discarded – undo
220 220
 	 */
221 221
 	public function getType()
222 222
 	{
223
-		if( isset( $this->values[$this->prefix . 'type'] ) ) {
224
-			return (string) $this->values[$this->prefix . 'type'];
223
+		if( isset( $this->values[$this->prefix.'type'] ) ) {
224
+			return (string) $this->values[$this->prefix.'type'];
225 225
 		}
226 226
 
227 227
 		return null;
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
 	 */
236 236
 	public function getTypeName()
237 237
 	{
238
-		if( isset( $this->values[$this->prefix . 'typename'] ) ) {
239
-			return (string) $this->values[$this->prefix . 'typename'];
238
+		if( isset( $this->values[$this->prefix.'typename'] ) ) {
239
+			return (string) $this->values[$this->prefix.'typename'];
240 240
 		}
241 241
 
242 242
 		return null;
@@ -250,8 +250,8 @@  discard block
 block discarded – undo
250 250
 	 */
251 251
 	public function getTypeId()
252 252
 	{
253
-		if( isset( $this->values[$this->prefix . 'typeid'] ) ) {
254
-			return (int) $this->values[$this->prefix . 'typeid'];
253
+		if( isset( $this->values[$this->prefix.'typeid'] ) ) {
254
+			return (int) $this->values[$this->prefix.'typeid'];
255 255
 		}
256 256
 
257 257
 		return null;
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 	{
269 269
 		if( (string) $typeid != $this->getTypeId() )
270 270
 		{
271
-			$this->values[$this->prefix . 'typeid'] = (string) $typeid;
271
+			$this->values[$this->prefix.'typeid'] = (string) $typeid;
272 272
 			$this->setModified();
273 273
 		}
274 274
 
@@ -283,8 +283,8 @@  discard block
 block discarded – undo
283 283
 	 */
284 284
 	public function getPosition()
285 285
 	{
286
-		if( isset( $this->values[$this->prefix . 'position'] ) ) {
287
-			return (int) $this->values[$this->prefix . 'position'];
286
+		if( isset( $this->values[$this->prefix.'position'] ) ) {
287
+			return (int) $this->values[$this->prefix.'position'];
288 288
 		}
289 289
 
290 290
 		return 0;
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 	{
302 302
 		if( (int) $pos !== $this->getPosition() )
303 303
 		{
304
-			$this->values[$this->prefix . 'position'] = (int) $pos;
304
+			$this->values[$this->prefix.'position'] = (int) $pos;
305 305
 			$this->setModified();
306 306
 		}
307 307
 
@@ -316,8 +316,8 @@  discard block
 block discarded – undo
316 316
 	 */
317 317
 	public function getStatus()
318 318
 	{
319
-		if( isset( $this->values[$this->prefix . 'status'] ) ) {
320
-			return (int) $this->values[$this->prefix . 'status'];
319
+		if( isset( $this->values[$this->prefix.'status'] ) ) {
320
+			return (int) $this->values[$this->prefix.'status'];
321 321
 		}
322 322
 
323 323
 		return 1;
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 	{
335 335
 		if( (int) $status !== $this->getStatus() )
336 336
 		{
337
-			$this->values[$this->prefix . 'status'] = (int) $status;
337
+			$this->values[$this->prefix.'status'] = (int) $status;
338 338
 			$this->setModified();
339 339
 		}
340 340
 
@@ -349,8 +349,8 @@  discard block
 block discarded – undo
349 349
 	 */
350 350
 	public function getConfig()
351 351
 	{
352
-		if( isset( $this->values[$this->prefix . 'config'] ) ) {
353
-			return (array) $this->values[$this->prefix . 'config'];
352
+		if( isset( $this->values[$this->prefix.'config'] ) ) {
353
+			return (array) $this->values[$this->prefix.'config'];
354 354
 		}
355 355
 
356 356
 		return [];
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 	 */
366 366
 	public function setConfig( array $config )
367 367
 	{
368
-		$this->values[$this->prefix . 'config'] = $config;
368
+		$this->values[$this->prefix.'config'] = $config;
369 369
 		$this->setModified();
370 370
 
371 371
 		return $this;
@@ -423,15 +423,15 @@  discard block
 block discarded – undo
423 423
 		{
424 424
 			switch( $key )
425 425
 			{
426
-				case $this->prefix . 'parentid': $this->setParentId( $value ); break;
427
-				case $this->prefix . 'typeid': $this->setTypeId( $value ); break;
428
-				case $this->prefix . 'domain': $this->setDomain( $value ); break;
429
-				case $this->prefix . 'refid': $this->setRefId( $value ); break;
430
-				case $this->prefix . 'datestart': $this->setDateStart( $value ); break;
431
-				case $this->prefix . 'dateend': $this->setDateEnd( $value ); break;
432
-				case $this->prefix . 'config': $this->setConfig( $value ); break;
433
-				case $this->prefix . 'position': $this->setPosition( $value ); break;
434
-				case $this->prefix . 'status': $this->setStatus( $value ); break;
426
+				case $this->prefix.'parentid': $this->setParentId( $value ); break;
427
+				case $this->prefix.'typeid': $this->setTypeId( $value ); break;
428
+				case $this->prefix.'domain': $this->setDomain( $value ); break;
429
+				case $this->prefix.'refid': $this->setRefId( $value ); break;
430
+				case $this->prefix.'datestart': $this->setDateStart( $value ); break;
431
+				case $this->prefix.'dateend': $this->setDateEnd( $value ); break;
432
+				case $this->prefix.'config': $this->setConfig( $value ); break;
433
+				case $this->prefix.'position': $this->setPosition( $value ); break;
434
+				case $this->prefix.'status': $this->setStatus( $value ); break;
435 435
 				default: $unknown[$key] = $value;
436 436
 			}
437 437
 		}
@@ -450,20 +450,20 @@  discard block
 block discarded – undo
450 450
 	{
451 451
 		$list = parent::toArray( $private );
452 452
 
453
-		$list[$this->prefix . 'domain'] = $this->getDomain();
454
-		$list[$this->prefix . 'refid'] = $this->getRefId();
455
-		$list[$this->prefix . 'datestart'] = $this->getDateStart();
456
-		$list[$this->prefix . 'dateend'] = $this->getDateEnd();
457
-		$list[$this->prefix . 'config'] = $this->getConfig();
458
-		$list[$this->prefix . 'position'] = $this->getPosition();
459
-		$list[$this->prefix . 'status'] = $this->getStatus();
460
-		$list[$this->prefix . 'typename'] = $this->getTypeName();
461
-		$list[$this->prefix . 'type'] = $this->getType();
453
+		$list[$this->prefix.'domain'] = $this->getDomain();
454
+		$list[$this->prefix.'refid'] = $this->getRefId();
455
+		$list[$this->prefix.'datestart'] = $this->getDateStart();
456
+		$list[$this->prefix.'dateend'] = $this->getDateEnd();
457
+		$list[$this->prefix.'config'] = $this->getConfig();
458
+		$list[$this->prefix.'position'] = $this->getPosition();
459
+		$list[$this->prefix.'status'] = $this->getStatus();
460
+		$list[$this->prefix.'typename'] = $this->getTypeName();
461
+		$list[$this->prefix.'type'] = $this->getType();
462 462
 
463 463
 		if( $private === true )
464 464
 		{
465
-			$list[$this->prefix . 'parentid'] = $this->getParentId();
466
-			$list[$this->prefix . 'typeid'] = $this->getTypeId();
465
+			$list[$this->prefix.'parentid'] = $this->getParentId();
466
+			$list[$this->prefix.'typeid'] = $this->getTypeId();
467 467
 		}
468 468
 
469 469
 		return $list;
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Price/Item/Standard.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -380,7 +380,7 @@
 block discarded – undo
380 380
 	 *
381 381
 	 * @param boolean $flag True if tax is included in the price value, costs and rebate, false if not
382 382
 	 * @return \Aimeos\MShop\Price\Item\Iface Price item for chaining method calls
383
-	*/
383
+	 */
384 384
 	public function setTaxFlag( $flag )
385 385
 	{
386 386
 		if( (bool) $flag !== $this->getTaxFlag() )
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Order/Item/Base/Iface.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	 * Returns the product item of an (future) order specified by its key.
84 84
 	 *
85 85
 	 * @param integer $key Key returned by getProducts() identifying the requested product
86
-	 * @return \Aimeos\MShop\Order\Product\Iface Product item of an order
86
+	 * @return Product\Iface Product item of an order
87 87
 	 */
88 88
 	public function getProduct( $key );
89 89
 
@@ -167,6 +167,7 @@  discard block
 block discarded – undo
167 167
 	 *
168 168
 	 * @param \Aimeos\MShop\Order\Item\Base\Service\Iface $service Order service item for the given domain
169 169
 	 * @param string $type Service type constant from \Aimeos\MShop\Order\Item\Service\Base
170
+	 * @return void
170 171
 	 */
171 172
 	public function addService( \Aimeos\MShop\Order\Item\Base\Service\Iface $service, $type );
172 173
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Supplier.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,9 @@
 block discarded – undo
135 135
 				$feconfig['supplier.code']['default'] = [$value => $address] + $feconfig['supplier.code']['default'];
136 136
 			}
137 137
 		}
138
-		catch( \Aimeos\MShop\Order\Exception $e ) {} // If service isn't available
138
+		catch( \Aimeos\MShop\Order\Exception $e )
139
+		{
140
+} // If service isn't available
139 141
 
140 142
 		return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) );
141 143
 	}
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Time.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 			$service = $basket->getService( $type, $this->getServiceItem()->getCode() );
111 111
 
112 112
 			if( ( $value = $service->getAttribute( 'time.hourminute', 'delivery' ) ) == '' ) {
113
-				$feconfig['time.hourminute']['default'] = date( 'H:i', time() + ($minute + 15 - ($minute % 15)) * 60 );
113
+				$feconfig['time.hourminute']['default'] = date( 'H:i', time() + ( $minute + 15 - ( $minute % 15 ) ) * 60 );
114 114
 			} else {
115 115
 				$feconfig['time.hourminute']['default'] = $value;
116 116
 			}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,9 @@
 block discarded – undo
115 115
 				$feconfig['time.hourminute']['default'] = $value;
116 116
 			}
117 117
 		}
118
-		catch( \Aimeos\MShop\Order\Exception $e ) {} // If service isn't available
118
+		catch( \Aimeos\MShop\Order\Exception $e )
119
+		{
120
+} // If service isn't available
119 121
 
120 122
 		return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) );
121 123
 	}
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Coupon/Provider/Base.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -376,8 +376,7 @@
 block discarded – undo
376 376
 			{
377 377
 				$value = $price->getValue() + $price->getCosts();
378 378
 				$rebate -= $value;
379
-			}
380
-			else
379
+			} else
381 380
 			{
382 381
 				$value = $rebate;
383 382
 				$rebate = '0.00';
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Plugin/Provider/Order/Shipping.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -117,7 +117,9 @@  discard block
 block discarded – undo
117 117
 				$this->checkThreshold( $order, $delivery->getPrice(), $config['threshold'] );
118 118
 			}
119 119
 		}
120
-		catch( \Aimeos\MShop\Order\Exception $oe ) {} // no delivery item available yet
120
+		catch( \Aimeos\MShop\Order\Exception $oe )
121
+		{
122
+} // no delivery item available yet
121 123
 
122 124
 		return true;
123 125
 	}
@@ -149,8 +151,7 @@  discard block
 block discarded – undo
149 151
 		{
150 152
 			$price->setRebate( $price->getCosts() );
151 153
 			$price->setCosts( '0.00' );
152
-		}
153
-		else if( $sum->getValue() + $sum->getRebate() < $threshold[$currency] && $price->getRebate() > '0.00' )
154
+		} else if( $sum->getValue() + $sum->getRebate() < $threshold[$currency] && $price->getRebate() > '0.00' )
154 155
 		{
155 156
 			$price->setCosts( $price->getRebate() );
156 157
 			$price->setRebate( '0.00' );
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Order/Item/Base/Service/Attribute/Standard.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@
 block discarded – undo
253 253
 	 * Sets the quantity of the service attribute.
254 254
 	 *
255 255
 	 * @param integer $value Quantity of the service attribute
256
-	 * @return \Aimeos\MShop\Order\Item\Base\Product\Attribute\Iface Order base service attribute item for chaining method calls
256
+	 * @return Standard Order base service attribute item for chaining method calls
257 257
 	 */
258 258
 	public function setQuantity( $value )
259 259
 	{
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Criteria/Base.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -90,8 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
 		if( in_array( $op, $operators['combine'], true ) ) {
92 92
 			return $this->createCombineExpression( $op, (array) $value );
93
-		}
94
-		else if( in_array( $op, $operators['compare'], true ) ) {
93
+		} else if( in_array( $op, $operators['compare'], true ) ) {
95 94
 			return $this->createCompareExpression( $op, (array) $value );
96 95
 		}
97 96
 
@@ -145,11 +144,9 @@  discard block
 block discarded – undo
145 144
 
146 145
 			if( in_array( $op, $operators['combine'] ) ) {
147 146
 				$results[] = $this->createCombineExpression( $op, (array) $entry[$op] );
148
-			}
149
-			else if( in_array( $op, $operators['compare'] ) ) {
147
+			} else if( in_array( $op, $operators['compare'] ) ) {
150 148
 				$results[] = $this->createCompareExpression( $op, (array) $entry[$op] );
151
-			}
152
-			else {
149
+			} else {
153 150
 				throw new \Aimeos\MW\Common\Exception( sprintf( 'Invalid operator "%1$s"', $op ) );
154 151
 			}
155 152
 		}
Please login to merge, or discard this patch.