Completed
Branch master (429264)
by Kamil
37:02
created
tests/Controller/CountryApiTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
         $this->loadFixturesFromFile('authentication/api_administrator.yml');
97 97
         $countries = $this->loadFixturesFromFile('resources/countries.yml');
98 98
 
99
-        $this->client->request('GET', '/api/countries/'.$countries['country_NL']->getId(), [], [], static::$authorizedHeaderWithAccept);
99
+        $this->client->request('GET', '/api/countries/' . $countries['country_NL']->getId(), [], [], static::$authorizedHeaderWithAccept);
100 100
 
101 101
         $response = $this->client->getResponse();
102 102
         $this->assertResponse($response, 'country/show_response', Response::HTTP_OK);
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Setup/ShippingContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -218,6 +218,6 @@
 block discarded – undo
218 218
      */
219 219
     private function generateCodeFromNameAndZone($shippingMethodName, $zoneCode = null)
220 220
     {
221
-        return str_replace([' ', '-'], '_', strtolower($shippingMethodName)).'_'.strtolower($zoneCode);
221
+        return str_replace([' ', '-'], '_', strtolower($shippingMethodName)) . '_' . strtolower($zoneCode);
222 222
     }
223 223
 }
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Setup/PaymentContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
     public function storeAllowsPaying($paymentMethodName)
80 80
     {
81 81
         $paymentMethod = $this->paymentMethodFactory->createNew();
82
-        $paymentMethod->setCode('PM_'.$paymentMethodName);
82
+        $paymentMethod->setCode('PM_' . $paymentMethodName);
83 83
         $paymentMethod->setName(ucfirst($paymentMethodName));
84 84
         $paymentMethod->setGateway($this->paymentMethodNameToGatewayConverter->convert($paymentMethodName));
85 85
         $paymentMethod->setDescription('Payment method');
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Setup/OrderContext.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
     {
311 311
         $customer = $user->getCustomer();
312 312
         for ($i = 0; $i < $numberOfOrders; $i++) {
313
-            $order = $this->createOrder($customer, '#00000'.$i);
313
+            $order = $this->createOrder($customer, '#00000' . $i);
314 314
             $order->setPaymentState(PaymentInterface::STATE_COMPLETED);
315 315
             $order->setCompletedAt(new \DateTime());
316 316
 
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
         $total = $this->getPriceFromString($total);
359 359
 
360 360
         for ($i = 0; $i < $numberOfOrders; $i++) {
361
-            $order = $this->createOrder($customers[rand(0, $numberOfCustomers - 1)], '#'.uniqid());
361
+            $order = $this->createOrder($customers[rand(0, $numberOfCustomers - 1)], '#' . uniqid());
362 362
             $order->setPaymentState(PaymentInterface::STATE_COMPLETED);
363 363
             $order->setCompletedAt(new \DateTime());
364 364
 
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
             $customer = $this->customerFactory->createNew();
503 503
             $customer->setEmail(sprintf('john%[email protected]', uniqid()));
504 504
             $customer->setFirstname('John');
505
-            $customer->setLastname('Doe'.$i);
505
+            $customer->setLastname('Doe' . $i);
506 506
 
507 507
             $customers[] = $customer;
508 508
 
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Setup/TaxationContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -212,6 +212,6 @@
 block discarded – undo
212 212
      */
213 213
     private function getCodeFromNameAndZoneCode($taxRateName, $zoneCode)
214 214
     {
215
-        return $this->getCodeFromName($taxRateName).'_'.strtolower($zoneCode);
215
+        return $this->getCodeFromName($taxRateName) . '_' . strtolower($zoneCode);
216 216
     }
217 217
 }
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Setup/ProductContext.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     {
124 124
         $product = $this->createProduct($productName, $price);
125 125
 
126
-        $product->setDescription('Awesome '.$productName);
126
+        $product->setDescription('Awesome ' . $productName);
127 127
 
128 128
         if ($this->sharedStorage->has('channel')) {
129 129
             $channel = $this->sharedStorage->get('channel');
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         $product->setName($productName);
144 144
         $product->setCode($this->convertToCode($productName));
145
-        $product->setDescription('Awesome '.$productName);
145
+        $product->setDescription('Awesome ' . $productName);
146 146
 
147 147
         $this->saveProduct($product);
148 148
     }
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      */
235 235
     public function thisProductHasAttributeWithValue(ProductInterface $product, $productAttributeType, $productAttributeName, $value)
236 236
     {
237
-        $attribute = $this->createProductAttribute($productAttributeType,$productAttributeName);
237
+        $attribute = $this->createProductAttribute($productAttributeType, $productAttributeName);
238 238
         $attributeValue = $this->createProductAttributeValue($value, $attribute);
239 239
         $product->addAttribute($attributeValue);
240 240
 
@@ -246,8 +246,8 @@  discard block
 block discarded – undo
246 246
      */
247 247
     public function thisProductHasPercentAttributeWithValue(ProductInterface $product, $productAttributeName, $value)
248 248
     {
249
-        $attribute = $this->createProductAttribute('percent',$productAttributeName);
250
-        $attributeValue = $this->createProductAttributeValue($value/100, $attribute);
249
+        $attribute = $this->createProductAttribute('percent', $productAttributeName);
250
+        $attributeValue = $this->createProductAttributeValue($value / 100, $attribute);
251 251
         $product->addAttribute($attributeValue);
252 252
 
253 253
         $this->objectManager->flush();
@@ -310,9 +310,9 @@  discard block
 block discarded – undo
310 310
         $product->addOption($option);
311 311
         $product->setVariantSelectionMethod(ProductInterface::VARIANT_SELECTION_MATCH);
312 312
 
313
-        $this->sharedStorage->set(sprintf('%s_option',$optionName), $option);
314
-        $this->sharedStorage->set(sprintf('%s_option_value',$firstValue), $firstOptionValue);
315
-        $this->sharedStorage->set(sprintf('%s_option_value',$secondValue), $secondOptionValue);
313
+        $this->sharedStorage->set(sprintf('%s_option', $optionName), $option);
314
+        $this->sharedStorage->set(sprintf('%s_option_value', $firstValue), $firstOptionValue);
315
+        $this->sharedStorage->set(sprintf('%s_option_value', $secondValue), $secondOptionValue);
316 316
 
317 317
         $this->objectManager->persist($option);
318 318
         $this->objectManager->persist($firstOptionValue);
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
         /** @var ProductVariantInterface $variant */
329 329
         $variant = $this->productVariantFactory->createNew();
330 330
 
331
-        $optionValue = $this->sharedStorage->get(sprintf('%s_option_value',$optionValueName));
331
+        $optionValue = $this->sharedStorage->get(sprintf('%s_option_value', $optionValueName));
332 332
 
333 333
         $variant->addOption($optionValue);
334 334
         $variant->setPrice($price);
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Transform/ShippingMethodContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     {
42 42
         $shippingMethod = $this->shippingMethodRepository->findOneByName($shippingMethodName);
43 43
         if (null === $shippingMethod) {
44
-            throw new \Exception('Shipping method with name "'.$shippingMethodName.'" does not exist');
44
+            throw new \Exception('Shipping method with name "' . $shippingMethodName . '" does not exist');
45 45
         }
46 46
 
47 47
         return $shippingMethod;
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Transform/ChannelContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     {
42 42
         $channel = $this->channelRepository->findOneByName($channelName);
43 43
         if (null === $channel) {
44
-            throw new \InvalidArgumentException('Channel with name "'.$channelName.'" does not exist');
44
+            throw new \InvalidArgumentException('Channel with name "' . $channelName . '" does not exist');
45 45
         }
46 46
 
47 47
         return $channel;
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Transform/TaxCategoryContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     {
42 42
         $taxCategory = $this->taxCategoryRepository->findOneByName($taxCategoryName);
43 43
         if (null === $taxCategory) {
44
-            throw new \InvalidArgumentException('Tax category with name "'.$taxCategoryName.'" does not exist');
44
+            throw new \InvalidArgumentException('Tax category with name "' . $taxCategoryName . '" does not exist');
45 45
         }
46 46
 
47 47
         return $taxCategory;
Please login to merge, or discard this patch.