@@ -52,7 +52,7 @@ |
||
| 52 | 52 | public function getMedia(string $mediaId, string $extension): Response |
| 53 | 53 | { |
| 54 | 54 | $cacheKey = md5(serialize(['media_file', $mediaId])); |
| 55 | - $media = $this->cacheProvider->get($cacheKey, function () use ($mediaId, $extension) { |
|
| 55 | + $media = $this->cacheProvider->get($cacheKey, function() use ($mediaId, $extension) { |
|
| 56 | 56 | return $this->fileProvider->getFile(ArticleMedia::handleMediaId($mediaId), $extension); |
| 57 | 57 | }); |
| 58 | 58 | |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | |
| 60 | 60 | public function getSavedCacheBlockTags(string $cacheKey) |
| 61 | 61 | { |
| 62 | - return $this->cache->get($cacheKey, function () { |
|
| 62 | + return $this->cache->get($cacheKey, function() { |
|
| 63 | 63 | if (null !== $this->currentCacheBlockKey) { |
| 64 | 64 | $this->currentCacheBlockKey = null; |
| 65 | 65 | |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | return $this->themes[$key]; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - return $this->cacheService->get('theme_'.$key, function () use ($tenant, $key) { |
|
| 77 | + return $this->cacheService->get('theme_'.$key, function() use ($tenant, $key) { |
|
| 78 | 78 | $themeName = $this->resolveThemeName($tenant); |
| 79 | 79 | if (null === $themeName) { |
| 80 | 80 | return null; |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | $geoIpPlaces = $article->getGeoIpPlaces(); |
| 45 | 45 | $cacheKey = $this->generateCacheKey($ipAddress, $article, $geoIpPlaces); |
| 46 | 46 | |
| 47 | - return $this->cacheProvider->get($cacheKey, function () use ($ipAddress, $geoIpPlaces) { |
|
| 47 | + return $this->cacheProvider->get($cacheKey, function() use ($ipAddress, $geoIpPlaces) { |
|
| 48 | 48 | return $this->geoIpChecker->isGranted($ipAddress, $geoIpPlaces); |
| 49 | 49 | }); |
| 50 | 50 | } |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | public function registerPeriodicTimer(Topic $topic): void |
| 66 | 66 | { |
| 67 | 67 | $n = 1; |
| 68 | - $this->periodicTimer->addPeriodicTimer($this, 'ping', 5, function () use ($topic, &$n) { |
|
| 68 | + $this->periodicTimer->addPeriodicTimer($this, 'ping', 5, function() use ($topic, &$n) { |
|
| 69 | 69 | $topic->broadcast(['ping' => $n]); |
| 70 | 70 | |
| 71 | 71 | ++$n; |
@@ -162,6 +162,6 @@ |
||
| 162 | 162 | */ |
| 163 | 163 | private function dispatchRouteEvent($eventName, RouteInterface $route) |
| 164 | 164 | { |
| 165 | - $this->eventDispatcher->dispatch(new RouteEvent($route, $eventName), $eventName); |
|
| 165 | + $this->eventDispatcher->dispatch(new RouteEvent($route, $eventName), $eventName); |
|
| 166 | 166 | } |
| 167 | 167 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | |
| 31 | 31 | public function getSortedItems(Criteria $criteria, array $sorting = [], array $groupValues = []): QueryBuilder; |
| 32 | 32 | |
| 33 | - public function getPaginatedByCriteria(EventDispatcherInterface $eventDispatcher,Criteria $criteria, array $sorting = [], PaginationData $paginationData = null); |
|
| 33 | + public function getPaginatedByCriteria(EventDispatcherInterface $eventDispatcher, Criteria $criteria, array $sorting = [], PaginationData $paginationData = null); |
|
| 34 | 34 | |
| 35 | 35 | public function getCountByCriteria(Criteria $criteria): int; |
| 36 | 36 | |
@@ -106,15 +106,15 @@ |
||
| 106 | 106 | |
| 107 | 107 | protected function createAdditionalCriteria(Request $request): array { |
| 108 | 108 | return [ |
| 109 | - 'routes' => array_filter((array)$request->query->get('route', [])), |
|
| 110 | - 'statuses' => array_filter((array)$request->query->get('status', [])), |
|
| 111 | - 'authors' => array_filter((array)$request->query->get('author', [])), |
|
| 109 | + 'routes' => array_filter((array) $request->query->get('route', [])), |
|
| 110 | + 'statuses' => array_filter((array) $request->query->get('status', [])), |
|
| 111 | + 'authors' => array_filter((array) $request->query->get('author', [])), |
|
| 112 | 112 | 'publishedBefore' => $request->query->has('published_before') ? new \DateTime($request->query->get('published_before')) : null, |
| 113 | 113 | 'publishedAfter' => $request->query->has('published_after') ? new \DateTime($request->query->get('published_after')) : null, |
| 114 | 114 | 'publishedAt' => $request->query->get('published_at'), |
| 115 | - 'sources' => array_filter((array)$request->query->get('source', [])), |
|
| 116 | - 'metadata' => array_filter((array)$request->query->get('metadata', [])), |
|
| 117 | - 'keywords' => array_filter((array)$request->query->get('keywords', [])), |
|
| 115 | + 'sources' => array_filter((array) $request->query->get('source', [])), |
|
| 116 | + 'metadata' => array_filter((array) $request->query->get('metadata', [])), |
|
| 117 | + 'keywords' => array_filter((array) $request->query->get('keywords', [])), |
|
| 118 | 118 | ]; |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * @Route("/api/{version}/packages/", methods={"GET"}, options={"expose"=true}, defaults={"version"="v2"}, name="swp_api_core_list_packages") |
| 54 | 54 | */ |
| 55 | 55 | public function searchAction(Request $request, RepositoryManagerInterface $repositoryManager) { |
| 56 | - $this->eventDispatcher->dispatch( new GenericEvent(), MultiTenancyEvents::TENANTABLE_DISABLE); |
|
| 56 | + $this->eventDispatcher->dispatch(new GenericEvent(), MultiTenancyEvents::TENANTABLE_DISABLE); |
|
| 57 | 57 | $currentTenant = $this->cachedTenantContext->getTenant(); |
| 58 | 58 | |
| 59 | 59 | $criteria = Criteria::fromQueryParameters( |
@@ -62,14 +62,14 @@ discard block |
||
| 62 | 62 | 'page' => $request->query->get('page'), |
| 63 | 63 | 'sort' => $request->query->get('sorting'), |
| 64 | 64 | 'limit' => $request->query->get('limit', 10), |
| 65 | - 'authors' => array_filter((array)$request->query->get('author', [])), |
|
| 65 | + 'authors' => array_filter((array) $request->query->get('author', [])), |
|
| 66 | 66 | 'publishedBefore' => $request->query->get('published_before'), |
| 67 | 67 | 'publishedAfter' => $request->query->get('published_after'), |
| 68 | 68 | 'organization' => $currentTenant->getOrganization()->getId(), |
| 69 | - 'sources' => array_filter((array)$request->query->get('source', [])), |
|
| 70 | - 'tenants' => array_filter((array)$request->query->get('tenant', [])), |
|
| 71 | - 'routes' => array_filter((array)$request->query->get('route', [])), |
|
| 72 | - 'statuses' => array_filter((array)$request->query->get('status', [])), |
|
| 69 | + 'sources' => array_filter((array) $request->query->get('source', [])), |
|
| 70 | + 'tenants' => array_filter((array) $request->query->get('tenant', [])), |
|
| 71 | + 'routes' => array_filter((array) $request->query->get('route', [])), |
|
| 72 | + 'statuses' => array_filter((array) $request->query->get('status', [])), |
|
| 73 | 73 | 'language' => $request->query->get('language', ''), |
| 74 | 74 | ] |
| 75 | 75 | ); |