@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | $images = $query->getArrayResult(); |
| 141 | 141 | |
| 142 | - $images = array_map(function ($image) { |
|
| 142 | + $images = array_map(function($image) { |
|
| 143 | 143 | return $this->getImagePath($image['path'] . '.' . $image['extension']); |
| 144 | 144 | }, $images); |
| 145 | 145 | |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | // Fix dimensions |
| 215 | 215 | $row = $this->prepareProductDimensions($row); |
| 216 | 216 | // Fix availability |
| 217 | - $row['availability'] = (int) $row['availability']; |
|
| 217 | + $row['availability'] = (int)$row['availability']; |
|
| 218 | 218 | |
| 219 | 219 | $row = $this->prepareCrossSellingProducts($row); |
| 220 | 220 | |
@@ -448,8 +448,8 @@ discard block |
||
| 448 | 448 | |
| 449 | 449 | /** |
| 450 | 450 | * @param Product $product |
| 451 | - * @param $active |
|
| 452 | - * @param $isMainVariant |
|
| 451 | + * @param boolean $active |
|
| 452 | + * @param boolean $isMainVariant |
|
| 453 | 453 | * @return null|Article |
| 454 | 454 | */ |
| 455 | 455 | private function getSWProductModel(Product $product, $active, &$isMainVariant) |
@@ -569,8 +569,8 @@ discard block |
||
| 569 | 569 | * |
| 570 | 570 | * @param $model |
| 571 | 571 | * @param $detail |
| 572 | - * @param $attribute |
|
| 573 | - * @param $product |
|
| 572 | + * @param ConnectAttribute $attribute |
|
| 573 | + * @param Product $product |
|
| 574 | 574 | * @return array |
| 575 | 575 | */ |
| 576 | 576 | public function getUpdateFields($model, $detail, $attribute, $product) |
@@ -610,7 +610,7 @@ discard block |
||
| 610 | 610 | * This method will check for the model->id in order to determine, if it is a new entity. Therefore |
| 611 | 611 | * this method cannot be used after the model in question was already flushed. |
| 612 | 612 | * |
| 613 | - * @param $field |
|
| 613 | + * @param string $field |
|
| 614 | 614 | * @param $model ProductModel |
| 615 | 615 | * @param $attribute ConnectAttribute |
| 616 | 616 | * @throws \RuntimeException |
@@ -655,7 +655,7 @@ discard block |
||
| 655 | 655 | /** |
| 656 | 656 | * Determine if a given field has changed |
| 657 | 657 | * |
| 658 | - * @param $field |
|
| 658 | + * @param string $field |
|
| 659 | 659 | * @param ProductModel $model |
| 660 | 660 | * @param DetailModel $detail |
| 661 | 661 | * @param Product $product |
@@ -1003,7 +1003,7 @@ discard block |
||
| 1003 | 1003 | |
| 1004 | 1004 | /** |
| 1005 | 1005 | * @param ProductModel $model |
| 1006 | - * @param array $categories |
|
| 1006 | + * @param Category[] $categories |
|
| 1007 | 1007 | */ |
| 1008 | 1008 | private function categoryDenormalization(ProductModel $model, array $categories) |
| 1009 | 1009 | { |
@@ -1052,7 +1052,7 @@ discard block |
||
| 1052 | 1052 | |
| 1053 | 1053 | /** |
| 1054 | 1054 | * @param ProductStream $stream |
| 1055 | - * @param ProductModel $article |
|
| 1055 | + * @param null|ProductModel $article |
|
| 1056 | 1056 | * @throws \Doctrine\DBAL\DBALException |
| 1057 | 1057 | */ |
| 1058 | 1058 | private function addProductToStream(ProductStream $stream, ProductModel $article) |
@@ -1116,7 +1116,7 @@ discard block |
||
| 1116 | 1116 | /** |
| 1117 | 1117 | * @param ProductModel $article |
| 1118 | 1118 | * @param DetailModel $detail |
| 1119 | - * @param array $priceRanges |
|
| 1119 | + * @param PriceRange[] $priceRanges |
|
| 1120 | 1120 | * @param Group $group |
| 1121 | 1121 | * @throws \Doctrine\DBAL\ConnectionException |
| 1122 | 1122 | * @throws \Exception |
@@ -1583,8 +1583,8 @@ discard block |
||
| 1583 | 1583 | } |
| 1584 | 1584 | |
| 1585 | 1585 | /** |
| 1586 | - * @param $articleId |
|
| 1587 | - * @param $product |
|
| 1586 | + * @param integer $articleId |
|
| 1587 | + * @param Product $product |
|
| 1588 | 1588 | */ |
| 1589 | 1589 | private function deleteRemovedRelations($articleId, $product) |
| 1590 | 1590 | { |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | } |
| 506 | 506 | } |
| 507 | 507 | |
| 508 | - /** |
|
| 508 | + /** |
|
| 509 | 509 | * Create index by articleID in s_plugin_connect_product_to_categories table. |
| 510 | 510 | */ |
| 511 | 511 | private function addProductToCategoryIndex() |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | CONSTRAINT s_plugin_connect_article_relations_fk_article_id FOREIGN KEY (article_id) REFERENCES s_articles (id) ON DELETE CASCADE |
| 559 | 559 | ) ENGINE = InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;' |
| 560 | 560 | ); |
| 561 | - } catch (\Exception $e) { |
|
| 561 | + } catch (\Exception $e) { |
|
| 562 | 562 | // ignore it if exists |
| 563 | 563 | $this->logger->write( |
| 564 | 564 | true, |