@@ -44,7 +44,7 @@ |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | public function viewAction(AmpInterface $object): Response { |
47 | - return $this->cacheService->get($this->getCacheKey($object), function () use ($object) { |
|
47 | + return $this->cacheService->get($this->getCacheKey($object), function() use ($object) { |
|
48 | 48 | $this->themeLoader->load(); |
49 | 49 | $content = $this->twig->render(sprintf('@%s/index.html.twig', ThemeLoaderInterface::THEME_NAMESPACE), [ |
50 | 50 | 'object' => $object, |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $redirectRoute = $this->redirectRouteRepository->findOneBy(['staticPrefix' => $candidates[0]]); |
73 | 73 | |
74 | 74 | if (null !== $redirectRoute) { |
75 | - $collection->add($redirectRoute->getRouteName() ?? '', $redirectRoute); |
|
75 | + $collection->add($redirectRoute->getRouteName() ?? '', $redirectRoute); |
|
76 | 76 | |
77 | 77 | return $collection; |
78 | 78 | } |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | */ |
250 | 250 | private function getArrayOfIdsFromRoutesArray(array $routes): array |
251 | 251 | { |
252 | - return array_map(function ($route) { |
|
252 | + return array_map(function($route) { |
|
253 | 253 | return $route->getId(); |
254 | 254 | }, $routes); |
255 | 255 | } |
@@ -50,6 +50,6 @@ |
||
50 | 50 | unset($parameters[RouteObjectInterface::ROUTE_OBJECT]); |
51 | 51 | } |
52 | 52 | |
53 | - return 'Route for media ' . $name->getValues()->getId() . ' not found'; |
|
53 | + return 'Route for media '.$name->getValues()->getId().' not found'; |
|
54 | 54 | } |
55 | 55 | } |
@@ -76,12 +76,12 @@ |
||
76 | 76 | |
77 | 77 | return $paginator->paginate( |
78 | 78 | $queryBuilder, |
79 | - (int)$criteria->get('firstResult', 0), |
|
80 | - (int)$criteria->get('maxResults', RepositoryInterface::MAX_RESULTS) |
|
79 | + (int) $criteria->get('firstResult', 0), |
|
80 | + (int) $criteria->get('maxResults', RepositoryInterface::MAX_RESULTS) |
|
81 | 81 | ); |
82 | 82 | } |
83 | 83 | |
84 | - return $this->getPaginator( $eventDispatcher,$queryBuilder, $paginationData); |
|
84 | + return $this->getPaginator($eventDispatcher, $queryBuilder, $paginationData); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | public function getCountByCriteria(Criteria $criteria): int |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | try { |
46 | 46 | return $this->routingExtension->getPath($name, $parameters, $relative); |
47 | - } catch (RouteNotFoundException|MissingMandatoryParametersException|InvalidParameterException $e) { |
|
47 | + } catch (RouteNotFoundException | MissingMandatoryParametersException | InvalidParameterException $e) { |
|
48 | 48 | // allow empty path |
49 | 49 | } |
50 | 50 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | try { |
66 | 66 | return $this->routingExtension->getUrl($name, $parameters, $schemeRelative); |
67 | - } catch (RouteNotFoundException|MissingMandatoryParametersException|InvalidParameterException $e) { |
|
67 | + } catch (RouteNotFoundException | MissingMandatoryParametersException | InvalidParameterException $e) { |
|
68 | 68 | // allow empty url |
69 | 69 | } |
70 | 70 |
@@ -83,7 +83,7 @@ |
||
83 | 83 | $name = $route->getId(); |
84 | 84 | } |
85 | 85 | |
86 | - return md5($name . serialize($parameters) . $type); |
|
86 | + return md5($name.serialize($parameters).$type); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -123,8 +123,8 @@ |
||
123 | 123 | /** @var SlidingPagination $pagination */ |
124 | 124 | $pagination = $this->paginator->paginate( |
125 | 125 | $queryBuilder, |
126 | - (int) $input->getOption('page'), |
|
127 | - (int) $input->getOption('limit') |
|
126 | + (int) $input->getOption('page'), |
|
127 | + (int) $input->getOption('limit') |
|
128 | 128 | ); |
129 | 129 | |
130 | 130 | $output->writeln(sprintf('<bg=green;options=bold>Packages found: %s</>', $pagination->getTotalItemCount())); |
@@ -71,6 +71,6 @@ |
||
71 | 71 | $name = $parameters[RouteObjectInterface::ROUTE_OBJECT]; |
72 | 72 | unset($parameters[RouteObjectInterface::ROUTE_OBJECT]); |
73 | 73 | } |
74 | - return 'Route for article author media ' . $name->getValues()->getId() . ' not found'; |
|
74 | + return 'Route for article author media '.$name->getValues()->getId().' not found'; |
|
75 | 75 | } |
76 | 76 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $meta = $parameters[RouteObjectInterface::ROUTE_OBJECT]; |
55 | 55 | unset($parameters[RouteObjectInterface::ROUTE_OBJECT]); |
56 | 56 | } |
57 | - return 'Route for media ' . $meta->getValues()->getId() . ' not found'; |
|
57 | + return 'Route for media '.$meta->getValues()->getId().' not found'; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | public function supports($name): bool { |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | true === $parameters['webp'] && |
116 | 116 | $item->hasVariant(ImageInterface::VARIANT_WEBP) |
117 | 117 | ) { |
118 | - return str_replace('.' . $item->getFileExtension(), '.webp', $url); |
|
118 | + return str_replace('.'.$item->getFileExtension(), '.webp', $url); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | return $url; |