Passed
Pull Request — master (#153)
by
unknown
04:26
created
client/html/src/Client/Html/Basket/Standard/Standard.php 1 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.
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/common/partials/attribute-standard.php 1 patch
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.