@@ -37,7 +37,7 @@ |
||
37 | 37 | * PHP 5.* bug, fixed in PHP 7: https://bugs.php.net/bug.php?id=50688 |
38 | 38 | * "usort(): Array was modified by the user comparison function" |
39 | 39 | */ |
40 | - @usort($files, function ($firstFile, $secondFile) use ($path) { |
|
40 | + @usort($files, function($firstFile, $secondFile) use ($path) { |
|
41 | 41 | $firstFile = str_replace($path, '', $firstFile); |
42 | 42 | $secondFile = str_replace($path, '', $secondFile); |
43 | 43 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | $this->getPaymentMethodByName('Offline')->shouldReturn($paymentMethod); |
54 | 54 | } |
55 | 55 | |
56 | - function it_throws_element_not_found_exception_if_payment_method_has_not_been_found ( |
|
56 | + function it_throws_element_not_found_exception_if_payment_method_has_not_been_found( |
|
57 | 57 | RepositoryInterface $paymentMethodRepository |
58 | 58 | ) { |
59 | 59 | $paymentMethodRepository->findOneBy(['name' => 'Free'])->willReturn(null); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $this->getProductByName('Mug')->shouldReturn($product); |
46 | 46 | } |
47 | 47 | |
48 | - function it_throws_element_not_found_exception_if_product_has_not_been_found ( |
|
48 | + function it_throws_element_not_found_exception_if_product_has_not_been_found( |
|
49 | 49 | RepositoryInterface $productRepository |
50 | 50 | ) { |
51 | 51 | $productRepository->findOneBy(['name' => 'T-Shirt'])->willReturn(null); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $this->getProductVariantByNameAndProduct('Eagle Millenium Mug', 'Mug')->shouldReturn($productVariant); |
66 | 66 | } |
67 | 67 | |
68 | - function it_throws_element_not_found_exception_if_product_variant_has_not_been_found ( |
|
68 | + function it_throws_element_not_found_exception_if_product_variant_has_not_been_found( |
|
69 | 69 | RepositoryInterface $productRepository, |
70 | 70 | RepositoryInterface $productVariantRepository, |
71 | 71 | ProductInterface $product |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function iShouldSeeThemedHomepage(ThemeInterface $theme) |
112 | 112 | { |
113 | - $content = file_get_contents(rtrim($theme->getPath(), '/') . '/SyliusWebBundle/views/Frontend/Homepage/main.html.twig'); |
|
113 | + $content = file_get_contents(rtrim($theme->getPath(), '/').'/SyliusWebBundle/views/Frontend/Homepage/main.html.twig'); |
|
114 | 114 | |
115 | 115 | expect($this->homePage->getContents())->toBe($content); |
116 | 116 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | */ |
121 | 121 | public function iShouldNotSeeThemedHomepage(ThemeInterface $theme) |
122 | 122 | { |
123 | - $content = file_get_contents(rtrim($theme->getPath(), '/') . '/SyliusWebBundle/views/Frontend/Homepage/main.html.twig'); |
|
123 | + $content = file_get_contents(rtrim($theme->getPath(), '/').'/SyliusWebBundle/views/Frontend/Homepage/main.html.twig'); |
|
124 | 124 | |
125 | 125 | expect($this->homePage->getContents())->notToBe($content); |
126 | 126 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | { |
79 | 79 | $theme = $this->themeFactory->createNamed($themeName); |
80 | 80 | $theme->setTitle($themeName); |
81 | - $theme->setPath(sys_get_temp_dir() . '/theme-' . $theme->getCode() . time() . '/'); |
|
81 | + $theme->setPath(sys_get_temp_dir().'/theme-'.$theme->getCode().time().'/'); |
|
82 | 82 | |
83 | 83 | if (!file_exists($theme->getPath())) { |
84 | 84 | mkdir($theme->getPath(), 0777, true); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function themeChangesHomepageTemplateContents(ThemeInterface $theme, $contents) |
120 | 120 | { |
121 | - $file = rtrim($theme->getPath(), '/') . '/SyliusWebBundle/views/Frontend/Homepage/main.html.twig'; |
|
121 | + $file = rtrim($theme->getPath(), '/').'/SyliusWebBundle/views/Frontend/Homepage/main.html.twig'; |
|
122 | 122 | $dir = dirname($file); |
123 | 123 | |
124 | 124 | if (!file_exists($dir)) { |
@@ -299,7 +299,7 @@ |
||
299 | 299 | } |
300 | 300 | |
301 | 301 | foreach ($facets as &$facet) { |
302 | - $facet = array_filter($facet, function($v){ |
|
302 | + $facet = array_filter($facet, function($v) { |
|
303 | 303 | return $v["doc_count"] != 0; |
304 | 304 | }); |
305 | 305 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | return; |
32 | 32 | } |
33 | 33 | |
34 | - $methodCalls = array_filter($symfonyTranslator->getMethodCalls(), function (array $methodCall) { |
|
34 | + $methodCalls = array_filter($symfonyTranslator->getMethodCalls(), function(array $methodCall) { |
|
35 | 35 | return 'setFallbackLocales' === $methodCall[0]; |
36 | 36 | }); |
37 | 37 |
@@ -159,7 +159,7 @@ |
||
159 | 159 | |
160 | 160 | $option = $this->getFactory('product_option')->createNew(); |
161 | 161 | $option->setCode($optionCode); |
162 | - $option->setName($name ?: $optionCode ); |
|
162 | + $option->setName($name ?: $optionCode); |
|
163 | 163 | |
164 | 164 | foreach (explode(',', $values) as $valueData) { |
165 | 165 | $valueData = preg_split('[\\[|\\]]', $valueData, -1, PREG_SPLIT_NO_EMPTY); |
@@ -53,7 +53,7 @@ |
||
53 | 53 | public function getMatchers() |
54 | 54 | { |
55 | 55 | return [ |
56 | - 'beSameAs' => function ($subject, $key) { |
|
56 | + 'beSameAs' => function($subject, $key) { |
|
57 | 57 | if (!$subject instanceof OrderItemUnitInterface || !$key instanceof OrderItemUnitInterface) { |
58 | 58 | return false; |
59 | 59 | } |