Passed
Pull Request — master (#153)
by
unknown
04:26
created
client/html/src/Client/Html/Basket/Standard/Standard.php 3 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -461,13 +461,13 @@  discard block
 block discarded – undo
461 461
 	 */
462 462
 	protected function addProducts( \Aimeos\MW\View\Iface $view )
463 463
 	{
464
-        $attrId = \Aimeos\MShop::create( $this->getContext(), 'attribute' )->find( 'custom', [], 'product', 'upload' )->getId();
464
+		$attrId = \Aimeos\MShop::create( $this->getContext(), 'attribute' )->find( 'custom', [], 'product', 'upload' )->getId();
465 465
 
466
-        $fs = $this->getContext()->fs( 'fs' );
466
+		$fs = $this->getContext()->fs( 'fs' );
467 467
 
468
-        if( !$fs->has('basket-upload' ) ) {
469
-            $fs->mkdir( 'basket-upload' );
470
-        }
468
+		if( !$fs->has('basket-upload' ) ) {
469
+			$fs->mkdir( 'basket-upload' );
470
+		}
471 471
 
472 472
 		$context = $this->getContext();
473 473
 		$domains = ['attribute', 'media', 'price', 'product', 'text', 'custom'];
@@ -494,26 +494,26 @@  discard block
 block discarded – undo
494 494
 			$entries = (array) $view->param( 'b_prod', [] );
495 495
 
496 496
 			for($i = 0; $i < count($entries); ++$i) {
497
-			    $paths = [];
498
-                if (isset( $entries[$i]['attrcustid'][$attrId] ) && is_array($entries[$i]['attrcustid'][$attrId])) {
499
-                    /** @var UploadedFile $file */
500
-                    foreach($entries[$i]['attrcustid'][$attrId] as $file) {
501
-                        $filepath = 'basket-upload/' . md5($file->getFilename() . microtime(true)) . '.' . $file->extension();
502
-                        try {
503
-                            $stream = fopen($file->getRealPath(), 'r+');
504
-                            $fs->writes($filepath, $stream);
505
-                            fclose($stream);
506
-                        } catch (\Exception $ex) {
507
-                            Log::error($ex->getMessage());
508
-                        }
509
-                        $paths[] = $filepath;
510
-                    }
511
-                    $entries[$i]['attrcustid'][$attrId] = $paths;
512
-                }
513
-                if( isset( $entries[$i]['prodid'] ) ) {
514
-                    $list[] = $entries[$i]['prodid'];
515
-                }
516
-            }
497
+				$paths = [];
498
+				if (isset( $entries[$i]['attrcustid'][$attrId] ) && is_array($entries[$i]['attrcustid'][$attrId])) {
499
+					/** @var UploadedFile $file */
500
+					foreach($entries[$i]['attrcustid'][$attrId] as $file) {
501
+						$filepath = 'basket-upload/' . md5($file->getFilename() . microtime(true)) . '.' . $file->extension();
502
+						try {
503
+							$stream = fopen($file->getRealPath(), 'r+');
504
+							$fs->writes($filepath, $stream);
505
+							fclose($stream);
506
+						} catch (\Exception $ex) {
507
+							Log::error($ex->getMessage());
508
+						}
509
+						$paths[] = $filepath;
510
+					}
511
+					$entries[$i]['attrcustid'][$attrId] = $paths;
512
+				}
513
+				if( isset( $entries[$i]['prodid'] ) ) {
514
+					$list[] = $entries[$i]['prodid'];
515
+				}
516
+			}
517 517
 			/*foreach( $entries as $values )
518 518
 			{
519 519
                 if (isset( $values['attrcustid'][$attrId] )) {
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 
536 536
 			foreach( $entries as $values )
537 537
 			{
538
-			    Log::debug(print_r($values, true));
538
+				Log::debug(print_r($values, true));
539 539
 				if( ( $values['prodid'] ?? null ) && ( $values['quantity'] ?? 0 ) > 0 )
540 540
 				{
541 541
 					$basketCntl->addProduct( $productCntl->get( $values['prodid'] ),
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
 
466 466
         $fs = $this->getContext()->fs( 'fs' );
467 467
 
468
-        if( !$fs->has('basket-upload' ) ) {
468
+        if( !$fs->has( 'basket-upload' ) ) {
469 469
             $fs->mkdir( 'basket-upload' );
470 470
         }
471 471
 
@@ -493,18 +493,18 @@  discard block
 block discarded – undo
493 493
 			$list = [];
494 494
 			$entries = (array) $view->param( 'b_prod', [] );
495 495
 
496
-			for($i = 0; $i < count($entries); ++$i) {
496
+			for( $i = 0; $i < count( $entries ); ++$i ) {
497 497
 			    $paths = [];
498
-                if (isset( $entries[$i]['attrcustid'][$attrId] ) && is_array($entries[$i]['attrcustid'][$attrId])) {
498
+                if( isset( $entries[$i]['attrcustid'][$attrId] ) && is_array( $entries[$i]['attrcustid'][$attrId] ) ) {
499 499
                     /** @var UploadedFile $file */
500
-                    foreach($entries[$i]['attrcustid'][$attrId] as $file) {
501
-                        $filepath = 'basket-upload/' . md5($file->getFilename() . microtime(true)) . '.' . $file->extension();
500
+                    foreach( $entries[$i]['attrcustid'][$attrId] as $file ) {
501
+                        $filepath = 'basket-upload/' . md5( $file->getFilename() . microtime( true ) ) . '.' . $file->extension();
502 502
                         try {
503
-                            $stream = fopen($file->getRealPath(), 'r+');
504
-                            $fs->writes($filepath, $stream);
505
-                            fclose($stream);
506
-                        } catch (\Exception $ex) {
507
-                            Log::error($ex->getMessage());
503
+                            $stream = fopen( $file->getRealPath(), 'r+' );
504
+                            $fs->writes( $filepath, $stream );
505
+                            fclose( $stream );
506
+                        } catch( \Exception $ex ) {
507
+                            Log::error( $ex->getMessage() );
508 508
                         }
509 509
                         $paths[] = $filepath;
510 510
                     }
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 
536 536
 			foreach( $entries as $values )
537 537
 			{
538
-			    Log::debug(print_r($values, true));
538
+			    Log::debug( print_r( $values, true ) );
539 539
 				if( ( $values['prodid'] ?? null ) && ( $values['quantity'] ?? 0 ) > 0 )
540 540
 				{
541 541
 					$basketCntl->addProduct( $productCntl->get( $values['prodid'] ),
Please login to merge, or discard this patch.
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -392,8 +392,7 @@  discard block
 block discarded – undo
392 392
 			$controller = $view->config( 'client/html/catalog/detail/url/controller', 'catalog' );
393 393
 			$action = $view->config( 'client/html/catalog/detail/url/action', 'detail' );
394 394
 			$config = $view->config( 'client/html/catalog/detail/url/config', [] );
395
-		}
396
-		else
395
+		} else
397 396
 		{
398 397
 			$params = $context->getSession()->get( 'aimeos/catalog/lists/params/last/' . $site, [] );
399 398
 
@@ -487,8 +486,7 @@  discard block
 block discarded – undo
487 486
 				(string) $view->param( 'b_supplier', '' ),
488 487
 				$view->param( 'b_siteid' )
489 488
 			);
490
-		}
491
-		else
489
+		} else
492 490
 		{
493 491
 			$list = [];
494 492
 			$entries = (array) $view->param( 'b_prod', [] );
@@ -499,11 +497,14 @@  discard block
 block discarded – undo
499 497
                     /** @var UploadedFile $file */
500 498
                     foreach($entries[$i]['attrcustid'][$attrId] as $file) {
501 499
                         $filepath = 'basket-upload/' . md5($file->getFilename() . microtime(true)) . '.' . $file->extension();
502
-                        try {
500
+                        try
501
+                        {
503 502
                             $stream = fopen($file->getRealPath(), 'r+');
504 503
                             $fs->writes($filepath, $stream);
505 504
                             fclose($stream);
506
-                        } catch (\Exception $ex) {
505
+                        }
506
+                        catch (\Exception $ex)
507
+                        {
507 508
                             Log::error($ex->getMessage());
508 509
                         }
509 510
                         $paths[] = $filepath;
Please login to merge, or discard this patch.
client/html/templates/common/summary/detail-standard.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -221,15 +221,15 @@
 block discarded – undo
221 221
 							<?php endif ?>
222 222
 						<?php endforeach ?>
223 223
 
224
-                        <?php foreach( $product->getAttributeItems( 'custom' ) as $attribute) : ?>
224
+                        <?php foreach( $product->getAttributeItems( 'custom' ) as $attribute ) : ?>
225 225
                             <?php if( $attribute->getCode() === 'upload' ) : ?>
226 226
                                 <div class="attr-list attr-type-<?= $enc->attr( $attribute ) ?>">
227 227
                                     <span class="name"><?= $attribute->getName() ?></span>
228 228
                                     <span class="value">
229 229
                                         <span class="image-uploads">
230
-                                            <?php foreach( $attribute->getValue() as $upload) : ?>
230
+                                            <?php foreach( $attribute->getValue() as $upload ) : ?>
231 231
                                                 <span class="image-upload">
232
-                                                    <img src="<?= $enc->attr( $this->content($upload) ) ?>" alt="upload-image" />
232
+                                                    <img src="<?= $enc->attr( $this->content( $upload ) ) ?>" alt="upload-image" />
233 233
                                                 </span>
234 234
                                             <?php endforeach ?>
235 235
                                         </span>
Please login to merge, or discard this patch.
client/html/templates/email/payment/pdf-body-standard.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 $this->pdf->setFont( 'dejavusans', '', 10 );
25 25
 
26 26
 $vmargin = [
27
-	'h1' => [ // HTML tag
27
+	'h1' => [// HTML tag
28 28
 		0 => ['h' => 1.5, 'n' => 0], // space before = h * n
29 29
 		1 => ['h' => 1.5, 'n' => 3] // space after = h * n
30 30
 	],
@@ -97,14 +97,14 @@  discard block
 block discarded – undo
97 97
 $data = [
98 98
 	'BCD', // required
99 99
 	'002', // Version 2 (required, 1=UTF-8, 2=ISO 8859-1, 3=ISO 8859-2, 4=ISO 8859-4, 5=ISO 8859-5, 6=ISO 8859-7, 7=ISO 8859-10, 8=ISO 8859-15)
100
-	1,     // UTF-8 (required)
100
+	1, // UTF-8 (required)
101 101
 	'SCT', // SEPA Credit Transfer (required)
102
-	'',    // BIC (optional)
103
-	'',    // Name of recipient (required, name of your company)
104
-	'',    // IBAN (required)
105
-	$this->summaryBasket->getPrice()->getCurrencyId() . $total,    // Currency and value (required)
106
-	'',    // Purpose (optional, 4 char code, https://wiki.windata.de/index.php?title=Purpose-SEPA-Codes)
107
-	'',    // ISO 11649 RF Creditor Reference (optional, 35 characters structured code)
102
+	'', // BIC (optional)
103
+	'', // Name of recipient (required, name of your company)
104
+	'', // IBAN (required)
105
+	$this->summaryBasket->getPrice()->getCurrencyId() . $total, // Currency and value (required)
106
+	'', // Purpose (optional, 4 char code, https://wiki.windata.de/index.php?title=Purpose-SEPA-Codes)
107
+	'', // ISO 11649 RF Creditor Reference (optional, 35 characters structured code)
108 108
 	$this->translate( 'client', 'Order' ) . ' ' . $this->extOrderItem->getOrderNumber(), // Reference of order and other data (optional, max. 140 characters)
109 109
 	$this->extOrderBaseItem->getCustomerReference(), // Notice to the customer (optional, max. 70 characters)
110 110
 ];
Please login to merge, or discard this patch.
client/html/src/Client/Html/Catalog/Session/Pinned/Standard.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -240,22 +240,22 @@
 block discarded – undo
240 240
 					}
241 241
 
242 242
 					/** client/html/catalog/session/pinned/maxitems
243
-					* Maximum number of products displayed in the "pinned" section
244
-					*
245
-					* This option limits the number of products that are shown in the
246
-					* "pinned" section after the users added the product to their list
247
-					* of pinned products. It must be a positive integer value greater
248
-					* than 0.
249
-					*
250
-					* Note: The higher the value is the more data has to be transfered
251
-					* to the client each time the user loads a page with the list of
252
-					* pinned products.
253
-					*
254
-					* @param integer Number of products
255
-					* @since 2014.09
256
-					* @category User
257
-					* @category Developer
258
-					*/
243
+					 * Maximum number of products displayed in the "pinned" section
244
+					 *
245
+					 * This option limits the number of products that are shown in the
246
+					 * "pinned" section after the users added the product to their list
247
+					 * of pinned products. It must be a positive integer value greater
248
+					 * than 0.
249
+					 *
250
+					 * Note: The higher the value is the more data has to be transfered
251
+					 * to the client each time the user loads a page with the list of
252
+					 * pinned products.
253
+					 *
254
+					 * @param integer Number of products
255
+					 * @since 2014.09
256
+					 * @category User
257
+					 * @category Developer
258
+					 */
259 259
 					$max = $context->getConfig()->get( 'client/html/catalog/session/pinned/maxitems', 50 );
260 260
 
261 261
 					$pinned = array_slice( $pinned, -$max, $max, true );
Please login to merge, or discard this patch.
client/html/templates/common/partials/attribute-standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@
 block discarded – undo
206 206
 					>
207 207
 				<?php break; case 'date': ?>
208 208
 					<input id="select-<?= $enc->attr( $this->productItem->getId() . '-' . $key ) ?>" class="form-control" type="date" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrcustid', $id] ) ) ?>">
209
-                <?php break;case 'upload': ?>
209
+                <?php break; case 'upload': ?>
210 210
                     <div class="upload-wrapper">
211 211
                         <div class="upload-view"
212 212
                              data-title="<?= $enc->html( $this->translate( 'client/code', $attribute->getName() ) ) ?>"
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,7 +155,8 @@  discard block
 block discarded – undo
155 155
 
156 156
 					</ul>
157 157
 
158
-				<?php else : ?>
158
+				<?php else {
159
+	: ?>
159 160
 
160 161
 					<input type="hidden" value="1" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrconfid', 'qty', ''] ) ) ?>">
161 162
 					<select id="select-<?= $enc->attr( $this->productItem->getId() . '-' . $code ) ?>" class="form-control select-list"
@@ -204,7 +205,9 @@  discard block
 block discarded – undo
204 205
 							value="<?= $enc->attr( $price->getValue() ) ?>"
205 206
 						<?php endif ?>
206 207
 					>
207
-				<?php break; case 'date': ?>
208
+				<?php break;
209
+}
210
+case 'date': ?>
208 211
 					<input id="select-<?= $enc->attr( $this->productItem->getId() . '-' . $key ) ?>" class="form-control" type="date" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrcustid', $id] ) ) ?>">
209 212
                 <?php break;case 'upload': ?>
210 213
                     <div class="upload-wrapper">
Please login to merge, or discard this patch.