@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | { |
27 | 27 | $client = $this->getClient(); |
28 | 28 | |
29 | - $crawler = $client->request('GET', '/template/'.$templateName); |
|
29 | + $crawler = $client->request('GET', '/template/' . $templateName); |
|
30 | 30 | $this->assertEquals($contents, trim($crawler->text())); |
31 | 31 | } |
32 | 32 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | { |
55 | 55 | $client = $this->getClient(); |
56 | 56 | |
57 | - $crawler = $client->request('GET', '/template/'.$templateName); |
|
57 | + $crawler = $client->request('GET', '/template/' . $templateName); |
|
58 | 58 | $this->assertEquals($contents, trim($crawler->text())); |
59 | 59 | } |
60 | 60 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | { |
83 | 83 | $client = $this->getClient(); |
84 | 84 | |
85 | - $crawler = $client->request('GET', '/template/'.$templateName); |
|
85 | + $crawler = $client->request('GET', '/template/' . $templateName); |
|
86 | 86 | $this->assertEquals($contents, trim($crawler->text())); |
87 | 87 | } |
88 | 88 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | { |
109 | 109 | $client = $this->getClient(); |
110 | 110 | |
111 | - $crawler = $client->request('GET', '/template/'.$templateName); |
|
111 | + $crawler = $client->request('GET', '/template/' . $templateName); |
|
112 | 112 | $this->assertEquals($contents, trim($crawler->text())); |
113 | 113 | } |
114 | 114 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | | sylius.two | |
57 | 57 | +------------+ |
58 | 58 | |
59 | -EOT |
|
59 | +eot |
|
60 | 60 | , $display); |
61 | 61 | } |
62 | 62 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | | whatever.something.elephants | camels | |
83 | 83 | +------------------------------+-----------------+ |
84 | 84 | |
85 | -EOT |
|
85 | +eot |
|
86 | 86 | , $display); |
87 | 87 | } |
88 | 88 |
@@ -969,7 +969,7 @@ discard block |
||
969 | 969 | ], |
970 | 970 | ]; |
971 | 971 | $routeFactory->createRoute('/products/new', $createDefaults, [], [], '', [], ['GET', 'POST']) |
972 | - ->willReturn($createRoute); |
|
972 | + ->willReturn($createRoute); |
|
973 | 973 | $routeCollection->add('sylius_product_create', $createRoute)->shouldBeCalled(); |
974 | 974 | |
975 | 975 | $updateDefaults = [ |
@@ -979,7 +979,7 @@ discard block |
||
979 | 979 | ], |
980 | 980 | ]; |
981 | 981 | $routeFactory->createRoute('/products/{id}/edit', $updateDefaults, [], [], '', [], ['GET', 'PUT', 'PATCH']) |
982 | - ->willReturn($updateRoute); |
|
982 | + ->willReturn($updateRoute); |
|
983 | 983 | $routeCollection->add('sylius_product_update', $updateRoute)->shouldBeCalled(); |
984 | 984 | |
985 | 985 | $deleteDefaults = [ |
@@ -989,7 +989,7 @@ discard block |
||
989 | 989 | ], |
990 | 990 | ]; |
991 | 991 | $routeFactory->createRoute('/products/{id}', $deleteDefaults, [], [], '', [], ['DELETE']) |
992 | - ->willReturn($deleteRoute); |
|
992 | + ->willReturn($deleteRoute); |
|
993 | 993 | $routeCollection->add('sylius_product_delete', $deleteRoute)->shouldBeCalled(); |
994 | 994 | |
995 | 995 | $this->load($configuration, 'sylius.resource')->shouldReturn($routeCollection); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | <<<EOT |
50 | 50 | foo: bar |
51 | 51 | only: string |
52 | -EOT; |
|
52 | +eot; |
|
53 | 53 | |
54 | 54 | $this |
55 | 55 | ->shouldThrow(InvalidConfigurationException::class) |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $configuration = |
64 | 64 | <<<EOT |
65 | 65 | alias: sylius.foo |
66 | -EOT; |
|
66 | +eot; |
|
67 | 67 | |
68 | 68 | $this |
69 | 69 | ->shouldThrow(\InvalidArgumentException::class) |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $configuration = |
93 | 93 | <<<EOT |
94 | 94 | alias: sylius.product |
95 | -EOT; |
|
95 | +eot; |
|
96 | 96 | |
97 | 97 | $showDefaults = [ |
98 | 98 | '_controller' => 'sylius.controller.product:showAction', |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $configuration = |
165 | 165 | <<<EOT |
166 | 166 | alias: sylius.product_option |
167 | -EOT; |
|
167 | +eot; |
|
168 | 168 | |
169 | 169 | $showDefaults = [ |
170 | 170 | '_controller' => 'sylius.controller.product_option:showAction', |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | <<<EOT |
238 | 238 | alias: sylius.product |
239 | 239 | path: super-duper-products |
240 | -EOT; |
|
240 | +eot; |
|
241 | 241 | |
242 | 242 | $showDefaults = [ |
243 | 243 | '_controller' => 'sylius.controller.product:showAction', |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | <<<EOT |
311 | 311 | alias: sylius.product |
312 | 312 | form: sylius_product_custom |
313 | -EOT; |
|
313 | +eot; |
|
314 | 314 | |
315 | 315 | $showDefaults = [ |
316 | 316 | '_controller' => 'sylius.controller.product:showAction', |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | <<<EOT |
386 | 386 | alias: sylius.product |
387 | 387 | section: admin |
388 | -EOT; |
|
388 | +eot; |
|
389 | 389 | |
390 | 390 | $showDefaults = [ |
391 | 391 | '_controller' => 'sylius.controller.product:showAction', |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | <<<EOT |
464 | 464 | alias: sylius.product |
465 | 465 | templates: SyliusAdminBundle:Product |
466 | -EOT; |
|
466 | +eot; |
|
467 | 467 | |
468 | 468 | $showDefaults = [ |
469 | 469 | '_controller' => 'sylius.controller.product:showAction', |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | <<<EOT |
539 | 539 | alias: sylius.product |
540 | 540 | except: ['show', 'delete'] |
541 | -EOT; |
|
541 | +eot; |
|
542 | 542 | |
543 | 543 | $indexDefaults = [ |
544 | 544 | '_controller' => 'sylius.controller.product:indexAction', |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | <<<EOT |
591 | 591 | alias: sylius.product |
592 | 592 | only: ['create', 'index'] |
593 | -EOT; |
|
593 | +eot; |
|
594 | 594 | |
595 | 595 | $indexDefaults = [ |
596 | 596 | '_controller' => 'sylius.controller.product:indexAction', |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | alias: sylius.product |
621 | 621 | except: ['show', 'delete'] |
622 | 622 | only: ['create'] |
623 | -EOT; |
|
623 | +eot; |
|
624 | 624 | |
625 | 625 | $this |
626 | 626 | ->shouldThrow(\InvalidArgumentException::class) |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | <<<EOT |
651 | 651 | alias: sylius.product |
652 | 652 | redirect: update |
653 | -EOT; |
|
653 | +eot; |
|
654 | 654 | |
655 | 655 | $showDefaults = [ |
656 | 656 | '_controller' => 'sylius.controller.product:showAction', |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | $configuration = |
725 | 725 | <<<EOT |
726 | 726 | alias: sylius.product |
727 | -EOT; |
|
727 | +eot; |
|
728 | 728 | |
729 | 729 | $showDefaults = [ |
730 | 730 | '_controller' => 'sylius.controller.product:showAction', |
@@ -799,7 +799,7 @@ discard block |
||
799 | 799 | alias: sylius.product |
800 | 800 | only: ['create', 'index'] |
801 | 801 | grid: sylius_admin_product |
802 | -EOT; |
|
802 | +eot; |
|
803 | 803 | |
804 | 804 | $indexDefaults = [ |
805 | 805 | '_controller' => 'sylius.controller.product:indexAction', |
@@ -852,7 +852,7 @@ discard block |
||
852 | 852 | bar: foo |
853 | 853 | update: |
854 | 854 | abc: xyz |
855 | -EOT; |
|
855 | +eot; |
|
856 | 856 | |
857 | 857 | $showDefaults = [ |
858 | 858 | '_controller' => 'sylius.controller.product:showAction', |
@@ -942,7 +942,7 @@ discard block |
||
942 | 942 | <<<EOT |
943 | 943 | alias: sylius.product |
944 | 944 | permission: true |
945 | -EOT; |
|
945 | +eot; |
|
946 | 946 | |
947 | 947 | $showDefaults = [ |
948 | 948 | '_controller' => 'sylius.controller.product:showAction', |
@@ -96,7 +96,7 @@ |
||
96 | 96 | protected function getPropertyName($name) |
97 | 97 | { |
98 | 98 | if (in_array($name, $this->translatableFields, true)) { |
99 | - return 'translations.'.$this->localeProvider->getDefaultLocaleCode().'.'.$name; |
|
99 | + return 'translations.' . $this->localeProvider->getDefaultLocaleCode() . '.' . $name; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | return $name; |
@@ -12,8 +12,8 @@ |
||
12 | 12 | namespace Sylius\Bundle\ResourceBundle\Doctrine\ODM\MongoDB; |
13 | 13 | |
14 | 14 | use Doctrine\MongoDB\Query\Builder as QueryBuilder; |
15 | -use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; |
|
16 | 15 | use Sylius\Component\Resource\Repository\TranslatableRepositoryInterface; |
16 | +use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Doctrine ORM driver translatable entity repository. |
@@ -133,11 +133,11 @@ |
||
133 | 133 | { |
134 | 134 | foreach ($parameters as $key => $value) { |
135 | 135 | if (is_array($value)) { |
136 | - $flattened = $this->flattenParameters($value, $flattened, $prefix.$key.'.'); |
|
136 | + $flattened = $this->flattenParameters($value, $flattened, $prefix . $key . '.'); |
|
137 | 137 | continue; |
138 | 138 | } |
139 | 139 | |
140 | - $flattened[$prefix.$key] = $value; |
|
140 | + $flattened[$prefix . $key] = $value; |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | return $flattened; |
@@ -55,7 +55,7 @@ |
||
55 | 55 | To show the metadata for a resource, pass its alias: |
56 | 56 | |
57 | 57 | $ php %command.full_name% sylius.user |
58 | -EOT |
|
58 | +eot |
|
59 | 59 | ); |
60 | 60 | $this->addArgument('resource', InputArgument::OPTIONAL, 'Resource to debug'); |
61 | 61 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | "username": "[email protected]", |
36 | 36 | "password": "sylius" |
37 | 37 | } |
38 | -EOT; |
|
38 | +eot; |
|
39 | 39 | |
40 | 40 | $this->client->request('POST', '/api/oauth/v2/token', [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
41 | 41 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | "grant_type": "refresh_token", |
59 | 59 | "refresh_token": "SampleRefreshTokenODllODY4ZTQyOThlNWIyMjA1ZDhmZjE1ZDYyMGMwOTUxOWM2NGFmNGRjNjQ2NDBhMDVlNGZjMmQ0YzgyNDM2Ng" |
60 | 60 | } |
61 | -EOT; |
|
61 | +eot; |
|
62 | 62 | |
63 | 63 | $this->client->request('POST', '/api/oauth/v2/token', [], [], ['CONTENT_TYPE' => 'application/json'], $data); |
64 | 64 |
@@ -20,24 +20,31 @@ |
||
20 | 20 | { |
21 | 21 | /** |
22 | 22 | * @param string $title |
23 | + * @return void |
|
23 | 24 | */ |
24 | 25 | public function titleReview($title); |
25 | 26 | |
26 | 27 | /** |
27 | 28 | * @param string $comment |
29 | + * @return void |
|
28 | 30 | */ |
29 | 31 | public function setComment($comment); |
30 | 32 | |
31 | 33 | /** |
32 | 34 | * @param string $author |
35 | + * @return void |
|
33 | 36 | */ |
34 | 37 | public function setAuthor($author); |
35 | 38 | |
36 | 39 | /** |
37 | 40 | * @param int $rate |
41 | + * @return void |
|
38 | 42 | */ |
39 | 43 | public function rateReview($rate); |
40 | 44 | |
45 | + /** |
|
46 | + * @return void |
|
47 | + */ |
|
41 | 48 | public function submitReview(); |
42 | 49 | |
43 | 50 | /** |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | ) { |
87 | 87 | $review = $this->createProductReview($product, $title, $rating, $title, $customer); |
88 | 88 | if (null !== $daysSinceCreation) { |
89 | - $review->setCreatedAt(new \DateTime('-'.$daysSinceCreation.' days')); |
|
89 | + $review->setCreatedAt(new \DateTime('-' . $daysSinceCreation . ' days')); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | $this->productReviewRepository->add($review); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | { |
115 | 115 | $customer = $this->sharedStorage->get('customer'); |
116 | 116 | foreach ($rates as $key => $rate) { |
117 | - $review = $this->createProductReview($product, 'Title '.$key, $rate, 'Comment '.$key, $customer); |
|
117 | + $review = $this->createProductReview($product, 'Title ' . $key, $rate, 'Comment ' . $key, $customer); |
|
118 | 118 | $this->productReviewRepository->add($review); |
119 | 119 | } |
120 | 120 | } |
@@ -42,6 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @param string $name |
45 | + * @return void |
|
45 | 46 | */ |
46 | 47 | public function setName($name); |
47 | 48 | |
@@ -52,6 +53,7 @@ discard block |
||
52 | 53 | |
53 | 54 | /** |
54 | 55 | * @param string $description |
56 | + * @return void |
|
55 | 57 | */ |
56 | 58 | public function setDescription($description); |
57 | 59 | |
@@ -62,6 +64,7 @@ discard block |
||
62 | 64 | |
63 | 65 | /** |
64 | 66 | * @param string $metaKeywords |
67 | + * @return void |
|
65 | 68 | */ |
66 | 69 | public function setMetaKeywords($metaKeywords); |
67 | 70 | |
@@ -72,6 +75,7 @@ discard block |
||
72 | 75 | |
73 | 76 | /** |
74 | 77 | * @param string $metaDescription |
78 | + * @return void |
|
75 | 79 | */ |
76 | 80 | public function setMetaDescription($metaDescription); |
77 | 81 | |
@@ -87,11 +91,13 @@ discard block |
||
87 | 91 | |
88 | 92 | /** |
89 | 93 | * @param ProductVariantInterface $variant |
94 | + * @return void |
|
90 | 95 | */ |
91 | 96 | public function addVariant(ProductVariantInterface $variant); |
92 | 97 | |
93 | 98 | /** |
94 | 99 | * @param ProductVariantInterface $variant |
100 | + * @return void |
|
95 | 101 | */ |
96 | 102 | public function removeVariant(ProductVariantInterface $variant); |
97 | 103 | |
@@ -114,11 +120,13 @@ discard block |
||
114 | 120 | |
115 | 121 | /** |
116 | 122 | * @param ProductOptionInterface $option |
123 | + * @return void |
|
117 | 124 | */ |
118 | 125 | public function addOption(ProductOptionInterface $option); |
119 | 126 | |
120 | 127 | /** |
121 | 128 | * @param ProductOptionInterface $option |
129 | + * @return void |
|
122 | 130 | */ |
123 | 131 | public function removeOption(ProductOptionInterface $option); |
124 | 132 | |
@@ -141,6 +149,7 @@ discard block |
||
141 | 149 | |
142 | 150 | /** |
143 | 151 | * @param \DateTime|null $availableOn |
152 | + * @return void |
|
144 | 153 | */ |
145 | 154 | public function setAvailableOn(\DateTime $availableOn = null); |
146 | 155 | |
@@ -151,11 +160,13 @@ discard block |
||
151 | 160 | |
152 | 161 | /** |
153 | 162 | * @param \DateTime|null $availableUntil |
163 | + * @return void |
|
154 | 164 | */ |
155 | 165 | public function setAvailableUntil(\DateTime $availableUntil = null); |
156 | 166 | |
157 | 167 | /** |
158 | 168 | * @param ProductAssociationInterface $association |
169 | + * @return void |
|
159 | 170 | */ |
160 | 171 | public function addAssociation(ProductAssociationInterface $association); |
161 | 172 | |
@@ -166,6 +177,7 @@ discard block |
||
166 | 177 | |
167 | 178 | /** |
168 | 179 | * @param ProductAssociationInterface $association |
180 | + * @return void |
|
169 | 181 | */ |
170 | 182 | public function removeAssociation(ProductAssociationInterface $association); |
171 | 183 |