Completed
Pull Request — master (#392)
by Christian
03:39
created
Components/ProductToShop.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -940,7 +940,7 @@
 block discarded – undo
940 940
         $detailAttribute->setConnectReference($product->sourceId);
941 941
         $detailAttribute->setConnectArticleShipping($product->shipping);
942 942
         //todo@sb: check if connectAttribute matches position of the marketplace attribute
943
-        array_walk($product->attributes, function ($value, $key) use ($detailAttribute) {
943
+        array_walk($product->attributes, function($value, $key) use ($detailAttribute) {
944 944
             $shopwareAttribute = $this->marketplaceGateway->findShopwareMappingFor($key);
945 945
             if (strlen($shopwareAttribute) > 0) {
946 946
                 $setter = 'set' . ucfirst($shopwareAttribute);
Please login to merge, or discard this patch.
Doc Comments   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -423,8 +423,8 @@  discard block
 block discarded – undo
423 423
 
424 424
     /**
425 425
      * @param Product $product
426
-     * @param $active
427
-     * @param $isMainVariant
426
+     * @param boolean $active
427
+     * @param boolean $isMainVariant
428 428
      * @return null|Article
429 429
      */
430 430
     private function getSWProductModel(Product $product, $active, &$isMainVariant)
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 
450 450
     /**
451 451
      * @param Product $product
452
-     * @param $model
452
+     * @param null|ProductModel $model
453 453
      * @return DetailModel
454 454
      */
455 455
     private function generateNewDetail(Product $product, $model)
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
     }
504 504
 
505 505
     /**
506
-     * @param ProductModel $model
506
+     * @param null|ProductModel $model
507 507
      */
508 508
     private function removeConnectImportedCategories(ProductModel $model)
509 509
     {
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
 
523 523
     /**
524 524
      * @param DetailModel $detail
525
-     * @param ProductModel $model
525
+     * @param null|ProductModel $model
526 526
      * @return AttributeModel
527 527
      */
528 528
     private function getOrCreateAttributeModel(DetailModel $detail, ProductModel $model)
@@ -542,10 +542,10 @@  discard block
 block discarded – undo
542 542
     /**
543 543
      * Get array of update info for the known fields
544 544
      *
545
-     * @param $model
545
+     * @param null|ProductModel $model
546 546
      * @param $detail
547
-     * @param $attribute
548
-     * @param $product
547
+     * @param ConnectAttribute $attribute
548
+     * @param Product $product
549 549
      * @return array
550 550
      */
551 551
     public function getUpdateFields($model, $detail, $attribute, $product)
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
      * This method will check for the model->id in order to determine, if it is a new entity. Therefore
586 586
      * this method cannot be used after the model in question was already flushed.
587 587
      *
588
-     * @param $field
588
+     * @param string $field
589 589
      * @param $model ProductModel
590 590
      * @param $attribute ConnectAttribute
591 591
      * @throws \RuntimeException
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
     /**
631 631
      * Determine if a given field has changed
632 632
      *
633
-     * @param $field
633
+     * @param string $field
634 634
      * @param ProductModel $model
635 635
      * @param DetailModel $detail
636 636
      * @param Product $product
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 
668 668
     /**
669 669
      * @param array $updateFields
670
-     * @param ProductModel $model
670
+     * @param null|ProductModel $model
671 671
      * @param AttributeModel $detailAttribute
672 672
      * @param Product $product
673 673
      */
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
     }
745 745
 
746 746
     /**
747
-     * @param ProductModel $article
747
+     * @param null|ProductModel $article
748 748
      * @param Product $product
749 749
      */
750 750
     private function applyProductProperties(ProductModel $article, Product $product)
@@ -990,8 +990,8 @@  discard block
 block discarded – undo
990 990
     }
991 991
 
992 992
     /**
993
-     * @param ProductModel $model
994
-     * @param array $categories
993
+     * @param null|ProductModel $model
994
+     * @param \Shopware\Models\Category\Category[] $categories
995 995
      */
996 996
     private function categoryDenormalization(ProductModel $model, array $categories)
997 997
     {
@@ -1010,7 +1010,7 @@  discard block
 block discarded – undo
1010 1010
      * Set detail purchase price with plain SQL
1011 1011
      * Entity usage throws exception when error handlers are disabled
1012 1012
      *
1013
-     * @param ProductModel $article
1013
+     * @param null|ProductModel $article
1014 1014
      * @param DetailModel $detail
1015 1015
      * @param Product $product
1016 1016
      * @throws \Doctrine\DBAL\DBALException
@@ -1057,7 +1057,7 @@  discard block
 block discarded – undo
1057 1057
     /**
1058 1058
      * @param ProductModel $article
1059 1059
      * @param DetailModel $detail
1060
-     * @param array $priceRanges
1060
+     * @param PriceRange[] $priceRanges
1061 1061
      * @param Group $group
1062 1062
      * @throws \Doctrine\DBAL\ConnectionException
1063 1063
      * @throws \Exception
@@ -1140,7 +1140,7 @@  discard block
 block discarded – undo
1140 1140
     /**
1141 1141
      * Adds translation record for given article
1142 1142
      *
1143
-     * @param ProductModel $article
1143
+     * @param null|ProductModel $article
1144 1144
      * @param Product $sdkProduct
1145 1145
      */
1146 1146
     private function addArticleTranslations(ProductModel $article, Product $sdkProduct)
@@ -1215,7 +1215,7 @@  discard block
 block discarded – undo
1215 1215
 
1216 1216
     /**
1217 1217
      * @param ProductStream $stream
1218
-     * @param ProductModel $article
1218
+     * @param null|ProductModel $article
1219 1219
      * @throws \Doctrine\DBAL\DBALException
1220 1220
      */
1221 1221
     private function addProductToStream(ProductStream $stream, ProductModel $article)
Please login to merge, or discard this patch.