@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | $articleBody = $article->getBody(); |
70 | 70 | $crawler = new Crawler($articleBody); |
71 | 71 | $crawler->filter('img') |
72 | - ->reduce(function (Crawler $node, $i) use ($input) { |
|
72 | + ->reduce(function(Crawler $node, $i) use ($input) { |
|
73 | 73 | if (false === strpos($node->attr('src'), $input->getArgument('term'))) { |
74 | 74 | return false; |
75 | 75 | } |
76 | 76 | }) |
77 | - ->each(static function (Crawler $crawler, $i) use ($input) { |
|
77 | + ->each(static function(Crawler $crawler, $i) use ($input) { |
|
78 | 78 | $closest = $crawler->closest($input->getArgument('parent')); |
79 | 79 | if (is_iterable($closest)) { |
80 | 80 | foreach ($closest as $node) { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | } |
84 | 84 | }); |
85 | 85 | |
86 | - $newContent = $crawler->filter('html body')->each(static function (Crawler $crawler) { |
|
86 | + $newContent = $crawler->filter('html body')->each(static function(Crawler $crawler) { |
|
87 | 87 | return $crawler->html(); |
88 | 88 | }); |
89 | 89 |
@@ -144,7 +144,7 @@ |
||
144 | 144 | $default = $input->getOption('default'); |
145 | 145 | if (!$input->getArgument($name) && !$default) { |
146 | 146 | $question = new Question(sprintf('<question>Please enter %s:</question>', $name)); |
147 | - $question->setValidator(function ($argument) use ($name) { |
|
147 | + $question->setValidator(function($argument) use ($name) { |
|
148 | 148 | if (empty($argument) && $name !== $this->arguments[1]) { |
149 | 149 | throw new \RuntimeException(sprintf('The %s can not be empty', $name)); |
150 | 150 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | if (!$input->getArgument('username')) { |
104 | 104 | $question = new Question('Please choose a username:'); |
105 | - $question->setValidator(function ($username) { |
|
105 | + $question->setValidator(function($username) { |
|
106 | 106 | if (empty($username)) { |
107 | 107 | throw new \Exception('Username can not be empty'); |
108 | 108 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | if (!$input->getArgument('email')) { |
116 | 116 | $question = new Question('Please choose an email:'); |
117 | - $question->setValidator(function ($email) { |
|
117 | + $question->setValidator(function($email) { |
|
118 | 118 | if (empty($email)) { |
119 | 119 | throw new \Exception('Email can not be empty'); |
120 | 120 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | |
127 | 127 | if (!$input->getArgument('password')) { |
128 | 128 | $question = new Question('Please choose a password:'); |
129 | - $question->setValidator(function ($password) { |
|
129 | + $question->setValidator(function($password) { |
|
130 | 130 | if (empty($password)) { |
131 | 131 | throw new \Exception('Password can not be empty'); |
132 | 132 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | AssetsInstaller::class |
34 | 34 | ); |
35 | 35 | |
36 | - if($newDefinition = $this->getDefinitionIfExists($container, AssetsInstallerInterface::class)) { |
|
36 | + if ($newDefinition = $this->getDefinitionIfExists($container, AssetsInstallerInterface::class)) { |
|
37 | 37 | $newDefinition->setArgument(4, new Reference(ThemeHierarchyProviderInterface::class)); |
38 | 38 | } |
39 | 39 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | } |
143 | 143 | $themes[$themeName] = $theme; |
144 | 144 | |
145 | - if(isset($configuration['generatedData'])) { |
|
145 | + if (isset($configuration['generatedData'])) { |
|
146 | 146 | $theme->setGeneratedData($configuration['generatedData']); |
147 | 147 | } |
148 | 148 | } |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | { |
176 | 176 | $tenantCode = substr($themeName, strpos($themeName, '@') + 1); |
177 | 177 | |
178 | - return array_map(function ($parentName) use ($themeName, $existingThemes, $tenantCode) { |
|
178 | + return array_map(function($parentName) use ($themeName, $existingThemes, $tenantCode) { |
|
179 | 179 | $parentName .= '@'.$tenantCode; |
180 | 180 | if (!isset($existingThemes[$parentName])) { |
181 | 181 | throw new ThemeLoadingFailedException(sprintf( |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | */ |
197 | 197 | private function convertAuthorsArraysToAuthorsObjects(array $authorsArrays) |
198 | 198 | { |
199 | - return array_map(function (array $authorArray) { |
|
199 | + return array_map(function(array $authorArray) { |
|
200 | 200 | return $this->themeAuthorFactory->createFromArray($authorArray); |
201 | 201 | }, $authorsArrays); |
202 | 202 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | */ |
209 | 209 | private function convertScreenshotsArraysToScreenshotsObjects(array $screenshotsArrays) |
210 | 210 | { |
211 | - return array_map(function (array $screenshotArray) { |
|
211 | + return array_map(function(array $screenshotArray) { |
|
212 | 212 | return $this->themeScreenshotFactory->createFromArray($screenshotArray); |
213 | 213 | }, $screenshotsArrays); |
214 | 214 | } |
@@ -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 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | /** |
40 | 40 | * @param Schema $schema |
41 | 41 | */ |
42 | - public function postUp(Schema $schema) : void |
|
42 | + public function postUp(Schema $schema) : void |
|
43 | 43 | { |
44 | 44 | $entityManager = $this->container->get('doctrine.orm.default_entity_manager'); |
45 | 45 | $query = $entityManager |
@@ -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; |