@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $pathInArray = explode('/', $zip->getNameIndex(0)); |
| 66 | 66 | $themeDirInZip = array_shift($pathInArray); |
| 67 | 67 | |
| 68 | - $themeConfiguration = $zip->getFromName($themeDirInZip . DIRECTORY_SEPARATOR . 'theme.json'); |
|
| 68 | + $themeConfiguration = $zip->getFromName($themeDirInZip.DIRECTORY_SEPARATOR.'theme.json'); |
|
| 69 | 69 | if (false === $themeConfiguration) { |
| 70 | 70 | throw new \Exception('In ZIP file we expect one directory and theme.json file inside'); |
| 71 | 71 | } |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | $themeName = $themeConfiguration['name']; |
| 79 | - $unpackedThemePath = $destinationFolder . DIRECTORY_SEPARATOR . $themeDirInZip; |
|
| 79 | + $unpackedThemePath = $destinationFolder.DIRECTORY_SEPARATOR.$themeDirInZip; |
|
| 80 | 80 | |
| 81 | 81 | if ($filesystem->exists($unpackedThemePath)) { |
| 82 | 82 | $filesystem->remove($unpackedThemePath); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $zip->extractTo($destinationFolder); |
| 86 | 86 | $zip->close(); |
| 87 | 87 | |
| 88 | - $finalPath = $destinationFolder . DIRECTORY_SEPARATOR . str_replace('/', '__', $themeName); |
|
| 88 | + $finalPath = $destinationFolder.DIRECTORY_SEPARATOR.str_replace('/', '__', $themeName); |
|
| 89 | 89 | $filesystem->rename($unpackedThemePath, $finalPath, true); |
| 90 | 90 | |
| 91 | 91 | return $finalPath; |
@@ -101,6 +101,6 @@ discard block |
||
| 101 | 101 | $tenant = $this->tenantContext->getTenant(); |
| 102 | 102 | $organization = $tenant->getOrganization(); |
| 103 | 103 | $organizationCode = $organization->getCode(); |
| 104 | - return sprintf($this->baseDir . DIRECTORY_SEPARATOR . ThemeUploaderInterface::AVAILABLE_THEMES_PATH, $organizationCode); |
|
| 104 | + return sprintf($this->baseDir.DIRECTORY_SEPARATOR.ThemeUploaderInterface::AVAILABLE_THEMES_PATH, $organizationCode); |
|
| 105 | 105 | } |
| 106 | 106 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $this->dispatcher->dispatch(new GenericEvent(), MultiTenancyEvents::TENANTABLE_ENABLE); |
| 51 | 51 | |
| 52 | 52 | $this->resolvedTenants[self::getCacheKey( |
| 53 | - $tenant->getSubdomain() ? $tenant->getSubdomain() . '.' . $tenant->getDomainName() : $tenant->getDomainName() |
|
| 53 | + $tenant->getSubdomain() ? $tenant->getSubdomain().'.'.$tenant->getDomainName() : $tenant->getDomainName() |
|
| 54 | 54 | )] = $tenant; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -60,6 +60,6 @@ discard block |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | private static function getCacheKey(string $host): string { |
| 63 | - return md5('tenant_cache__' . $host); |
|
| 63 | + return md5('tenant_cache__'.$host); |
|
| 64 | 64 | } |
| 65 | 65 | } |
@@ -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 | } |
@@ -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 | } |