@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | public function loadConfigsFromPath($configsPath) |
127 | 127 | { |
128 | 128 | if (file_exists($configsPath)) { |
129 | - $this->metadataCache->get('metadata_config_files', function () use ($configsPath) { |
|
129 | + $this->metadataCache->get('metadata_config_files', function() use ($configsPath) { |
|
130 | 130 | $finder = new Finder(); |
131 | 131 | $finder->in($configsPath)->files()->name('*.{yaml,yml}'); |
132 | 132 | $files = []; |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | public function addNewConfig(string $filePath) |
190 | 190 | { |
191 | 191 | $cacheKey = md5($filePath); |
192 | - return $this->metadataCache->get($cacheKey, function () use ($filePath) { |
|
192 | + return $this->metadataCache->get($cacheKey, function() use ($filePath) { |
|
193 | 193 | if (!is_readable($filePath)) { |
194 | 194 | throw new \InvalidArgumentException('Configuration file is not readable for parser'); |
195 | 195 | } |
@@ -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 | } |