@@ -198,6 +198,9 @@ |
||
| 198 | 198 | ]); |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | + /** |
|
| 202 | + * @param null|string $token |
|
| 203 | + */ |
|
| 201 | 204 | private function generateOrGetApiKey(UserInterface $user, $token) |
| 202 | 205 | { |
| 203 | 206 | $apiKey = null; |
@@ -93,6 +93,9 @@ |
||
| 93 | 93 | return new SingleResourceResponse($list); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | + /** |
|
| 97 | + * @param string $id |
|
| 98 | + */ |
|
| 96 | 99 | private function findArticleOr404($id) |
| 97 | 100 | { |
| 98 | 101 | if (null === $article = $this->get('swp.repository.article')->findOneById($id)) { |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | $tenantCode = $tenant->getCode(); |
| 85 | 85 | $themes = array_filter( |
| 86 | 86 | $this->get('sylius.repository.theme')->findAll(), |
| 87 | - static function ($element) use (&$tenantCode) { |
|
| 87 | + static function($element) use (&$tenantCode) { |
|
| 88 | 88 | if (strpos($element->getName(), ThemeHelper::SUFFIX_SEPARATOR.$tenantCode)) { |
| 89 | 89 | return true; |
| 90 | 90 | } |
@@ -143,7 +143,7 @@ |
||
| 143 | 143 | |
| 144 | 144 | $ids = array_column($rules['tenants'], 'tenant'); |
| 145 | 145 | $ids = array_unique($ids); |
| 146 | - $tenants = array_filter($rules['tenants'], static function ($key, $value) use ($ids) { |
|
| 146 | + $tenants = array_filter($rules['tenants'], static function($key, $value) use ($ids) { |
|
| 147 | 147 | return array_key_exists($value, $ids); |
| 148 | 148 | }, ARRAY_FILTER_USE_BOTH); |
| 149 | 149 | |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | $this->removeOldRelatedArticles($article); |
| 51 | 51 | |
| 52 | - $relatedItemsGroups = $package->getGroups()->filter(static function ($group) { |
|
| 52 | + $relatedItemsGroups = $package->getGroups()->filter(static function($group) { |
|
| 53 | 53 | return GroupInterface::TYPE_RELATED === $group->getType(); |
| 54 | 54 | }); |
| 55 | 55 | |