@@ -12,7 +12,6 @@ |
||
12 | 12 | namespace spec\Sylius\Component\Shipping\Checker; |
13 | 13 | |
14 | 14 | use PhpSpec\ObjectBehavior; |
15 | -use Sylius\Component\Registry\ServiceRegistryInterface; |
|
16 | 15 | use Sylius\Component\Shipping\Checker\ShippingMethodEligibilityChecker; |
17 | 16 | use Sylius\Component\Shipping\Checker\ShippingMethodEligibilityCheckerInterface; |
18 | 17 | use Sylius\Component\Shipping\Model\ShippableInterface; |
@@ -26,6 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | /** |
28 | 28 | * @param string $provider |
29 | + * @return void |
|
29 | 30 | */ |
30 | 31 | public function setProvider($provider); |
31 | 32 | |
@@ -36,6 +37,7 @@ discard block |
||
36 | 37 | |
37 | 38 | /** |
38 | 39 | * @param string $identifier |
40 | + * @return void |
|
39 | 41 | */ |
40 | 42 | public function setIdentifier($identifier); |
41 | 43 | |
@@ -46,6 +48,7 @@ discard block |
||
46 | 48 | |
47 | 49 | /** |
48 | 50 | * @param string $accessToken |
51 | + * @return void |
|
49 | 52 | */ |
50 | 53 | public function setAccessToken($accessToken); |
51 | 54 | |
@@ -56,6 +59,7 @@ discard block |
||
56 | 59 | |
57 | 60 | /** |
58 | 61 | * @param string $refreshToken |
62 | + * @return void |
|
59 | 63 | */ |
60 | 64 | public function setRefreshToken($refreshToken); |
61 | 65 | } |
@@ -52,10 +52,10 @@ |
||
52 | 52 | /** |
53 | 53 | * @return string |
54 | 54 | */ |
55 | - public function getRefreshToken(); |
|
55 | + public function getRefreshToken(); |
|
56 | 56 | |
57 | - /** |
|
58 | - * @param string $refreshToken |
|
59 | - */ |
|
60 | - public function setRefreshToken($refreshToken); |
|
57 | + /** |
|
58 | + * @param string $refreshToken |
|
59 | + */ |
|
60 | + public function setRefreshToken($refreshToken); |
|
61 | 61 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | $province = $this->provinceRepository->findOneBy(['code' => $address->getProvinceCode()]); |
51 | - Assert::notNull($province,sprintf('Province with code "%s" not found.', $address->getProvinceCode())); |
|
51 | + Assert::notNull($province, sprintf('Province with code "%s" not found.', $address->getProvinceCode())); |
|
52 | 52 | |
53 | 53 | return $province->getName(); |
54 | 54 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | |
69 | 69 | $province = $this->provinceRepository->findOneBy(['code' => $address->getProvinceCode()]); |
70 | - Assert::notNull($province,sprintf('Province with code "%s" not found.', $address->getProvinceCode())); |
|
70 | + Assert::notNull($province, sprintf('Province with code "%s" not found.', $address->getProvinceCode())); |
|
71 | 71 | |
72 | 72 | return $province->getAbbreviation() ?: $province->getName(); |
73 | 73 | } |
@@ -137,7 +137,7 @@ |
||
137 | 137 | $messages = []; |
138 | 138 | |
139 | 139 | /** @var SplFileInfo $file */ |
140 | - foreach($finder as $file) { |
|
140 | + foreach ($finder as $file) { |
|
141 | 141 | $messages[] = unserialize($file->getContents()); |
142 | 142 | } |
143 | 143 |
@@ -92,10 +92,10 @@ |
||
92 | 92 | $string .= '('; |
93 | 93 | |
94 | 94 | foreach ($this->getOptionValues() as $option) { |
95 | - $string .= $option->getOption()->getName().': '.$option->getValue().', '; |
|
95 | + $string .= $option->getOption()->getName() . ': ' . $option->getValue() . ', '; |
|
96 | 96 | } |
97 | 97 | |
98 | - $string = substr($string, 0, -2).')'; |
|
98 | + $string = substr($string, 0, -2) . ')'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | return $string; |
@@ -52,8 +52,8 @@ |
||
52 | 52 | StateMachineInterface $secondOrderStateMachine |
53 | 53 | ) { |
54 | 54 | $orderRepository->findOrdersUnpaidSince(Argument::type(\DateTime::class))->willReturn([ |
55 | - $firstOrder, |
|
56 | - $secondOrder |
|
55 | + $firstOrder, |
|
56 | + $secondOrder |
|
57 | 57 | ]); |
58 | 58 | |
59 | 59 | $stateMachineFactory->get($firstOrder, 'sylius_order')->willReturn($firstOrderStateMachine); |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | public function cancel() |
55 | 55 | { |
56 | - $expiredUnpaidOrders = $this->orderRepository->findOrdersUnpaidSince(new \DateTime('-'.$this->expirationPeriod)); |
|
56 | + $expiredUnpaidOrders = $this->orderRepository->findOrdersUnpaidSince(new \DateTime('-' . $this->expirationPeriod)); |
|
57 | 57 | foreach ($expiredUnpaidOrders as $expiredUnpaidOrder) { |
58 | 58 | $this->cancelOrder($expiredUnpaidOrder); |
59 | 59 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | |
41 | 41 | public function remove() |
42 | 42 | { |
43 | - $expiredCarts = $this->orderRepository->findCartsNotModifiedSince(new \DateTime('-'.$this->expirationPeriod)); |
|
43 | + $expiredCarts = $this->orderRepository->findCartsNotModifiedSince(new \DateTime('-' . $this->expirationPeriod)); |
|
44 | 44 | foreach ($expiredCarts as $expiredCart) { |
45 | 45 | $this->orderRepository->remove($expiredCart); |
46 | 46 | } |
@@ -120,7 +120,7 @@ |
||
120 | 120 | $filesPath = $this->getParameter('files_path'); |
121 | 121 | |
122 | 122 | $taxonImage = $this->taxonImageFactory->createNew(); |
123 | - $taxonImage->setFile(new UploadedFile($filesPath.$imagePath, basename($imagePath))); |
|
123 | + $taxonImage->setFile(new UploadedFile($filesPath . $imagePath, basename($imagePath))); |
|
124 | 124 | $taxonImage->setCode($imageCode); |
125 | 125 | $this->imageUploader->upload($taxonImage); |
126 | 126 |