@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * Returns array with category entities |
| 54 | 54 | * if they don't exist will be created |
| 55 | 55 | * |
| 56 | - * @param array $categories |
|
| 56 | + * @param string[] $categories |
|
| 57 | 57 | * @return \Shopware\Models\Category\Category[] |
| 58 | 58 | */ |
| 59 | 59 | abstract public function resolve(array $categories); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | /** |
| 71 | 71 | * Stores raw Shopware Connect categories |
| 72 | 72 | * |
| 73 | - * @param array $categories |
|
| 73 | + * @param string[] $categories |
|
| 74 | 74 | * @param int $articleId |
| 75 | 75 | * @return void |
| 76 | 76 | */ |
@@ -99,8 +99,8 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | 101 | * @param RemoteCategory[] $remoteCategories |
| 102 | - * @param array $currentConnectCategoryIds |
|
| 103 | - * @param $articleId |
|
| 102 | + * @param integer[] $currentConnectCategoryIds |
|
| 103 | + * @param integer $articleId |
|
| 104 | 104 | */ |
| 105 | 105 | private function addProductToRemoteCategory(array $remoteCategories, array $currentConnectCategoryIds, $articleId) |
| 106 | 106 | { |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | /** |
| 119 | 119 | * @param \Shopware\CustomModels\Connect\RemoteCategory[] $assignedCategories |
| 120 | - * @param array $currentConnectCategoryIds |
|
| 120 | + * @param integer[] $currentConnectCategoryIds |
|
| 121 | 121 | * @param int $articleId |
| 122 | 122 | */ |
| 123 | 123 | private function removeProductsFromNotAssignedRemoteCategories(array $assignedCategories, array $currentConnectCategoryIds, $articleId) |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | */ |
| 123 | 123 | private function removeProductsFromNotAssignedRemoteCategories(array $assignedCategories, array $currentConnectCategoryIds, $articleId) |
| 124 | 124 | { |
| 125 | - $assignedCategoryIds = array_map(function (RemoteCategory $assignedCategory) { |
|
| 125 | + $assignedCategoryIds = array_map(function(RemoteCategory $assignedCategory) { |
|
| 126 | 126 | $assignedCategory->getId(); |
| 127 | 127 | }, $assignedCategories); |
| 128 | 128 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $query->setHydrationMode($query::HYDRATE_OBJECT); |
| 106 | 106 | $result = $query->getArrayResult(); |
| 107 | 107 | |
| 108 | - return array_map(function ($resultItem) { |
|
| 108 | + return array_map(function($resultItem) { |
|
| 109 | 109 | return $resultItem['id']; |
| 110 | 110 | }, $result); |
| 111 | 111 | } |
@@ -135,13 +135,13 @@ discard block |
||
| 135 | 135 | $builder = $this->createQueryBuilder('ptrc'); |
| 136 | 136 | $builder->select('ptrc.connectCategoryId'); |
| 137 | 137 | $builder->where('ptrc.articleId = :articleId'); |
| 138 | - $builder->setParameter('articleId', (int) $articleId); |
|
| 138 | + $builder->setParameter('articleId', (int)$articleId); |
|
| 139 | 139 | |
| 140 | 140 | $query = $builder->getQuery(); |
| 141 | 141 | $result = $query->getResult($query::HYDRATE_SCALAR); |
| 142 | 142 | |
| 143 | 143 | return array_map( |
| 144 | - function ($row) { |
|
| 144 | + function($row) { |
|
| 145 | 145 | return $row['connectCategoryId']; |
| 146 | 146 | }, |
| 147 | 147 | $result |
@@ -158,8 +158,8 @@ discard block |
||
| 158 | 158 | $builder->delete('Shopware\CustomModels\Connect\ProductToRemoteCategory', 'ptrc'); |
| 159 | 159 | $builder->where('ptrc.connectCategoryId = :ccid'); |
| 160 | 160 | $builder->andWhere('ptrc.articleId = :articleId'); |
| 161 | - $builder->setParameter(':ccid', (int) $categoryId); |
|
| 162 | - $builder->setParameter(':articleId', (int) $articleId); |
|
| 161 | + $builder->setParameter(':ccid', (int)$categoryId); |
|
| 162 | + $builder->setParameter(':articleId', (int)$articleId); |
|
| 163 | 163 | $builder->getQuery()->execute(); |
| 164 | 164 | } |
| 165 | 165 | } |