@@ -49,7 +49,7 @@ |
||
49 | 49 | |
50 | 50 | $this->removeOldRelatedArticles($article); |
51 | 51 | |
52 | - $relatedItemsGroups = $package->getItems()->filter(static function ($item) { |
|
52 | + $relatedItemsGroups = $package->getItems()->filter(static function($item) { |
|
53 | 53 | return ItemInterface::TYPE_TEXT === $item->getType(); |
54 | 54 | }); |
55 | 55 |
@@ -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)) { |
@@ -18,7 +18,6 @@ |
||
18 | 18 | use Nelmio\ApiDocBundle\Annotation\Model; |
19 | 19 | use SWP\Bundle\CoreBundle\Form\Type\ThemeInstallType; |
20 | 20 | use SWP\Bundle\CoreBundle\Form\Type\ThemeUploadType; |
21 | -use SWP\Bundle\CoreBundle\Model\Tenant; |
|
22 | 21 | use SWP\Bundle\CoreBundle\Model\TenantInterface; |
23 | 22 | use SWP\Bundle\CoreBundle\Theme\Helper\ThemeHelper; |
24 | 23 | use SWP\Component\Common\Response\ResourcesListResponseInterface; |
@@ -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 |
@@ -62,6 +62,9 @@ |
||
62 | 62 | return $result; |
63 | 63 | } |
64 | 64 | |
65 | + /** |
|
66 | + * @return string |
|
67 | + */ |
|
65 | 68 | private function getFragmentFromUrl(string $url, string $fragment): ?string |
66 | 69 | { |
67 | 70 | $fragments = \parse_url($url); |
@@ -43,7 +43,7 @@ |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | $items = $package->getItems()->filter( |
46 | - static function ($entry) use ($guids) { |
|
46 | + static function($entry) use ($guids) { |
|
47 | 47 | return !in_array($entry->getGuid(), $guids, true); |
48 | 48 | } |
49 | 49 | ); |
@@ -29,6 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | /** |
31 | 31 | * @param string $about |
32 | + * @return void |
|
32 | 33 | */ |
33 | 34 | public function setAbout(string $about); |
34 | 35 | |
@@ -39,6 +40,7 @@ discard block |
||
39 | 40 | |
40 | 41 | /** |
41 | 42 | * @param string $firstName |
43 | + * @return void |
|
42 | 44 | */ |
43 | 45 | public function setFirstName(string $firstName); |
44 | 46 | |
@@ -49,6 +51,7 @@ discard block |
||
49 | 51 | |
50 | 52 | /** |
51 | 53 | * @param string $lastName |
54 | + * @return void |
|
52 | 55 | */ |
53 | 56 | public function setLastName(string $lastName); |
54 | 57 | |
@@ -59,6 +62,7 @@ discard block |
||
59 | 62 | |
60 | 63 | /** |
61 | 64 | * @param string $externalId |
65 | + * @return void |
|
62 | 66 | */ |
63 | 67 | public function setExternalId(string $externalId); |
64 | 68 | } |
@@ -120,6 +120,9 @@ |
||
120 | 120 | return ConsumerInterface::MSG_ACK; |
121 | 121 | } |
122 | 122 | |
123 | + /** |
|
124 | + * @param ImageInterface $image |
|
125 | + */ |
|
123 | 126 | private function markArticlesMediaAsUpdated($image) |
124 | 127 | { |
125 | 128 | /** @var ImageRenditionInterface[] $articleMedia */ |
@@ -228,6 +228,9 @@ |
||
228 | 228 | ]); |
229 | 229 | } |
230 | 230 | |
231 | + /** |
|
232 | + * @param null|string $token |
|
233 | + */ |
|
231 | 234 | private function generateOrGetApiKey(UserInterface $user, $token): ?ApiKeyInterface |
232 | 235 | { |
233 | 236 | $apiKey = null; |