@@ -166,7 +166,7 @@ |
||
166 | 166 | */ |
167 | 167 | public function removeAuthor(ThemeAuthor $author) |
168 | 168 | { |
169 | - $this->authors = array_values(array_filter($this->authors, function (ThemeAuthor $existingAuthor) use ($author) { |
|
169 | + $this->authors = array_values(array_filter($this->authors, function(ThemeAuthor $existingAuthor) use ($author) { |
|
170 | 170 | return $existingAuthor !== $author; |
171 | 171 | })); |
172 | 172 | } |
@@ -101,7 +101,7 @@ |
||
101 | 101 | $authorNodeDefinition = $authorsNodeDefinition->prototype('array'); |
102 | 102 | $authorNodeDefinition |
103 | 103 | ->validate() |
104 | - ->ifTrue(function ($author) { |
|
104 | + ->ifTrue(function($author) { |
|
105 | 105 | return [] === $author; |
106 | 106 | }) |
107 | 107 | ->thenInvalid('Author cannot be empty!') |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | private function convertParentsNamesToParentsObjects($themeName, array $parentsNames, array $existingThemes) |
145 | 145 | { |
146 | - return array_map(function ($parentName) use ($themeName, $existingThemes) { |
|
146 | + return array_map(function($parentName) use ($themeName, $existingThemes) { |
|
147 | 147 | if (!isset($existingThemes[$parentName])) { |
148 | 148 | throw new ThemeLoadingFailedException(sprintf( |
149 | 149 | 'Unexisting theme "%s" is required by "%s".', |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | private function convertAuthorsArraysToAuthorsObjects(array $authorsArrays) |
165 | 165 | { |
166 | - return array_map(function (array $authorArray) { |
|
166 | + return array_map(function(array $authorArray) { |
|
167 | 167 | return $this->themeAuthorFactory->createFromArray($authorArray); |
168 | 168 | }, $authorsArrays); |
169 | 169 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | */ |
62 | 62 | private function formatCycleToString(array $themes) |
63 | 63 | { |
64 | - $themesNames = array_map(function (ThemeInterface $theme) { |
|
64 | + $themesNames = array_map(function(ThemeInterface $theme) { |
|
65 | 65 | return $theme->getName(); |
66 | 66 | }, $themes); |
67 | 67 |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $existingThemes = array_udiff( |
63 | 63 | $persistedThemes, |
64 | 64 | $removedThemes, |
65 | - function (ThemeInterface $firstTheme, ThemeInterface $secondTheme) { |
|
65 | + function(ThemeInterface $firstTheme, ThemeInterface $secondTheme) { |
|
66 | 66 | return (int) ($firstTheme->getName() === $secondTheme->getName()); |
67 | 67 | } |
68 | 68 | ); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | return []; |
110 | 110 | } |
111 | 111 | |
112 | - $loadedThemesNames = array_map(function (ThemeInterface $theme) { |
|
112 | + $loadedThemesNames = array_map(function(ThemeInterface $theme) { |
|
113 | 113 | return $theme->getName(); |
114 | 114 | }, $loadedThemes); |
115 | 115 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | foreach ($loadedTheme->getParents() as $parentTheme) { |
140 | 140 | $correspondingTheme = current(array_filter( |
141 | 141 | array_merge($existingThemes, $loadedThemes), |
142 | - function (ThemeInterface $theme) use ($parentTheme) { |
|
142 | + function(ThemeInterface $theme) use ($parentTheme) { |
|
143 | 143 | return $theme->getName() === $parentTheme->getName(); |
144 | 144 | } |
145 | 145 | )); |
@@ -27,12 +27,12 @@ |
||
27 | 27 | public function it_uses_app_themes_filesystem_as_the_default_source() |
28 | 28 | { |
29 | 29 | $this->assertProcessedConfigurationEquals( |
30 | - [ |
|
31 | - [], |
|
32 | - ], |
|
33 | - ['sources' => ['filesystem' => ['locations' => ['%kernel.root_dir%/themes', '%kernel.root_dir%/../vendor/sylius/themes']]]], |
|
30 | + [ |
|
31 | + [], |
|
32 | + ], |
|
33 | + ['sources' => ['filesystem' => ['locations' => ['%kernel.root_dir%/themes', '%kernel.root_dir%/../vendor/sylius/themes']]]], |
|
34 | 34 | 'sources' |
35 | - ); |
|
35 | + ); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
@@ -48,7 +48,7 @@ |
||
48 | 48 | public function getMatchers() |
49 | 49 | { |
50 | 50 | return [ |
51 | - 'beThemeWithName' => function (ThemeInterface $theme, $expectedName) { |
|
51 | + 'beThemeWithName' => function(ThemeInterface $theme, $expectedName) { |
|
52 | 52 | return $expectedName === $theme->getName(); |
53 | 53 | }, |
54 | 54 | ]; |
@@ -45,7 +45,7 @@ |
||
45 | 45 | public function getMatchers() |
46 | 46 | { |
47 | 47 | return [ |
48 | - 'beAnAuthorWithNameAndEmail' => function (ThemeAuthor $themeAuthor, $name, $email) { |
|
48 | + 'beAnAuthorWithNameAndEmail' => function(ThemeAuthor $themeAuthor, $name, $email) { |
|
49 | 49 | return $name === $themeAuthor->getName() && $email === $themeAuthor->getEmail(); |
50 | 50 | }, |
51 | 51 | ]; |
@@ -57,7 +57,7 @@ |
||
57 | 57 | |
58 | 58 | function it_proxies_hydrating_and_converts_parents_to_collection_if_needed(HydratorInterface $decoratedHydrator) |
59 | 59 | { |
60 | - $decoratedHydrator->hydrate(Argument::that(function (array $data) { |
|
60 | + $decoratedHydrator->hydrate(Argument::that(function(array $data) { |
|
61 | 61 | if (!isset($data['data']) || $data['data'] !== 'data') { |
62 | 62 | return false; |
63 | 63 | } |