@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $themeContext->getTheme()->shouldBeCalled()->willReturn(null); |
54 | 54 | $versionStrategy->applyVersion($path)->shouldBeCalled()->willReturn($path); |
55 | 55 | |
56 | - $this->getUrl($path)->shouldReturn($this->getBasePath() . $path); |
|
56 | + $this->getUrl($path)->shouldReturn($this->getBasePath().$path); |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | function it_returns_modified_url_if_there_is_active_theme( |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $pathResolver->resolve($path, $theme)->shouldBeCalled()->willReturn($themeAssetPath); |
71 | 71 | $versionStrategy->applyVersion($themeAssetPath)->shouldBeCalled()->willReturn($themeAssetPath); |
72 | 72 | |
73 | - $this->getUrl($path)->shouldReturn($this->getBasePath() . $themeAssetPath); |
|
73 | + $this->getUrl($path)->shouldReturn($this->getBasePath().$themeAssetPath); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -78,6 +78,6 @@ discard block |
||
78 | 78 | */ |
79 | 79 | private function getBasePath() |
80 | 80 | { |
81 | - return $this->getFixturePath('web') . '/'; |
|
81 | + return $this->getFixturePath('web').'/'; |
|
82 | 82 | } |
83 | 83 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $this->bundleResourceLocator = $bundleResourceLocator; |
62 | 62 | $this->applicationResourceLocator = $applicationResourceLocator; |
63 | 63 | |
64 | - if (null !== $cacheDir && is_file($cache = $cacheDir . '/templates.php')) { |
|
64 | + if (null !== $cacheDir && is_file($cache = $cacheDir.'/templates.php')) { |
|
65 | 65 | $this->cache = require $cache; |
66 | 66 | } |
67 | 67 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $key = $template->getLogicalName(); |
148 | 148 | |
149 | 149 | if (null !== $theme) { |
150 | - $key .= '|' . $theme->getSlug(); |
|
150 | + $key .= '|'.$theme->getSlug(); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | return $key; |
@@ -77,13 +77,13 @@ |
||
77 | 77 | $this->themeContext->setTheme($theme); |
78 | 78 | |
79 | 79 | $path = $this->locator->locate($template); |
80 | - $templates[$template->getLogicalName() . "|" . $theme->getSlug()] = $path; |
|
80 | + $templates[$template->getLogicalName()."|".$theme->getSlug()] = $path; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | $templates[$template->getLogicalName()] = $this->locator->locate($template); |
84 | 84 | } |
85 | 85 | |
86 | - $this->writeCacheFile($cacheDir . '/templates.php', sprintf('<?php return %s;', var_export($templates, true))); |
|
86 | + $this->writeCacheFile($cacheDir.'/templates.php', sprintf('<?php return %s;', var_export($templates, true))); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -141,7 +141,7 @@ |
||
141 | 141 | $themes = $this->themeContext->getThemeHierarchy(); |
142 | 142 | |
143 | 143 | foreach ($themes as $theme) { |
144 | - yield $id . "|" . $theme->getSlug(); |
|
144 | + yield $id."|".$theme->getSlug(); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | yield $id; |
@@ -54,7 +54,7 @@ |
||
54 | 54 | |
55 | 55 | foreach ($messages as $key => $value) { |
56 | 56 | unset($messages[$key]); |
57 | - $messages[$key . '|' . $theme->getSlug()] = $value; |
|
57 | + $messages[$key.'|'.$theme->getSlug()] = $value; |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | $messageCatalogue->replace($messages, $domain); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $files = []; |
58 | 58 | $finder = Finder::create() |
59 | 59 | ->files() |
60 | - ->filter(function (SplFileInfo $file) { |
|
60 | + ->filter(function(SplFileInfo $file) { |
|
61 | 61 | return 2 === substr_count($file->getBasename(), '.') && preg_match('/\.\w+$/', $file->getBasename()); |
62 | 62 | }) |
63 | 63 | ->in($dirs); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $files[$locale] = []; |
70 | 70 | } |
71 | 71 | |
72 | - $files[$locale][] = (string)$file; |
|
72 | + $files[$locale][] = (string) $file; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | $options = array_merge_recursive( |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | $dirs = []; |
94 | 94 | foreach ($themes as $theme) { |
95 | 95 | foreach ($container->getParameter('kernel.bundles') as $bundle => $class) { |
96 | - if (is_dir($dir = $theme->getPath() . '/' . $bundle . '/translations')) { |
|
96 | + if (is_dir($dir = $theme->getPath().'/'.$bundle.'/translations')) { |
|
97 | 97 | $dirs[] = $dir; |
98 | 98 | } |
99 | 99 | } |
100 | 100 | |
101 | - if (is_dir($dir = $theme->getPath() . '/translations')) { |
|
101 | + if (is_dir($dir = $theme->getPath().'/translations')) { |
|
102 | 102 | $dirs[] = $dir; |
103 | 103 | } |
104 | 104 | } |
@@ -37,10 +37,10 @@ |
||
37 | 37 | $loaders = $container->findTaggedServiceIds('translation.loader'); |
38 | 38 | foreach (array_keys($loaders) as $id) { |
39 | 39 | $container |
40 | - ->register('sylius.theme.translation.loader.' . $id, ThemeAwareLoader::class) |
|
40 | + ->register('sylius.theme.translation.loader.'.$id, ThemeAwareLoader::class) |
|
41 | 41 | ->setDecoratedService($id) |
42 | 42 | ->setArguments([ |
43 | - new Reference('sylius.theme.translation.loader.' . $id . '.inner'), |
|
43 | + new Reference('sylius.theme.translation.loader.'.$id.'.inner'), |
|
44 | 44 | new Reference('sylius.theme.repository'), |
45 | 45 | ]) |
46 | 46 | ; |
@@ -23,6 +23,6 @@ |
||
23 | 23 | */ |
24 | 24 | public function resolve($path, ThemeInterface $theme) |
25 | 25 | { |
26 | - return str_replace('bundles/', 'bundles/_theme/' . $theme->getSlug() . '/', $path); |
|
26 | + return str_replace('bundles/', 'bundles/_theme/'.$theme->getSlug().'/', $path); |
|
27 | 27 | } |
28 | 28 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | public function installAssets($targetDir, $symlinkMask) |
80 | 80 | { |
81 | 81 | // Create the bundles directory otherwise symlink will fail. |
82 | - $targetDir = rtrim($targetDir, '/') . '/bundles/'; |
|
82 | + $targetDir = rtrim($targetDir, '/').'/bundles/'; |
|
83 | 83 | $this->filesystem->mkdir($targetDir); |
84 | 84 | |
85 | 85 | $effectiveSymlinkMask = $symlinkMask; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | |
139 | 139 | /** @var SplFileInfo[] $finder */ |
140 | 140 | foreach ($finder as $originFile) { |
141 | - $targetFile = $targetDir . '/' . $originFile->getRelativePathname(); |
|
141 | + $targetFile = $targetDir.'/'.$originFile->getRelativePathname(); |
|
142 | 142 | $targetFile = $this->pathResolver->resolve($targetFile, $theme); |
143 | 143 | |
144 | 144 | if (file_exists($targetFile)) { |
@@ -233,13 +233,13 @@ discard block |
||
233 | 233 | $sources = []; |
234 | 234 | |
235 | 235 | foreach ($themes as $theme) { |
236 | - $sourceDir = $theme->getPath() . '/' . $bundle->getName() . '/public'; |
|
236 | + $sourceDir = $theme->getPath().'/'.$bundle->getName().'/public'; |
|
237 | 237 | if (is_dir($sourceDir)) { |
238 | 238 | $sources[] = $sourceDir; |
239 | 239 | } |
240 | 240 | } |
241 | 241 | |
242 | - $sourceDir = $bundle->getPath() . '/Resources/public'; |
|
242 | + $sourceDir = $bundle->getPath().'/Resources/public'; |
|
243 | 243 | if (is_dir($sourceDir)) { |
244 | 244 | $sources[] = $sourceDir; |
245 | 245 | } |