Completed
Push — master ( 2c8981...1ecbe4 )
by Kamil
23:19
created
src/Sylius/Behat/Page/Shop/Product/ShowPageInterface.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,5 +63,5 @@
 block discarded – undo
63 63
      *
64 64
      * @return bool
65 65
      */
66
-     public function isAttributeWithValueOnPage($attributeName, $AttributeValue);
66
+        public function isAttributeWithValueOnPage($attributeName, $AttributeValue);
67 67
 }
Please login to merge, or discard this patch.
src/Sylius/Behat/Page/Shop/Product/ShowPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,8 +118,8 @@
 block discarded – undo
118 118
     private function isAttributeWith($fieldValue, $selector)
119 119
     {
120 120
         $rows = $this->getElement('attributes')->findAll('css', $selector);
121
-        foreach($rows as $row) {
122
-            if($fieldValue === $row->getText()) {
121
+        foreach ($rows as $row) {
122
+            if ($fieldValue === $row->getText()) {
123 123
                 return true;
124 124
             }
125 125
         }
Please login to merge, or discard this patch.
src/Sylius/Behat/Page/Shop/Cart/SummaryPage.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function isItemWithName($name)
124 124
     {
125
-       return $this->findItemWith($name, 'tbody  tr > td > div > a > strong');
125
+        return $this->findItemWith($name, 'tbody  tr > td > div > a > strong');
126 126
     }
127 127
 
128 128
     /**
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
      */
131 131
     public function isItemWithVariant($variantName)
132 132
     {
133
-       return $this->findItemWith($variantName, 'tbody  tr > td > strong');
133
+        return $this->findItemWith($variantName, 'tbody  tr > td > strong');
134 134
     }
135 135
 
136 136
     /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     public function isEmpty()
150 150
     {
151 151
         $isEmpty = strpos($this->getDocument()->find('css', '.message')->getText(), 'Your cart is empty');
152
-        if (false === $isEmpty ) {
152
+        if (false === $isEmpty) {
153 153
             return false;
154 154
         }
155 155
 
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
     {
198 198
         $itemsAttributes = $this->getElement('cart items')->findAll('css', $selector);
199 199
 
200
-        foreach($itemsAttributes as $itemAttribute) {
201
-            if($attributeName === $itemAttribute->getText()) {
200
+        foreach ($itemsAttributes as $itemAttribute) {
201
+            if ($attributeName === $itemAttribute->getText()) {
202 202
                 return true;
203 203
             }
204 204
         }
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Setup/ProductContext.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 
163 163
         $product->setName($productName);
164 164
         $product->setPrice(0);
165
-        $product->setDescription('Awesome ' . $productName);
165
+        $product->setDescription('Awesome '.$productName);
166 166
         $product->addChannel($channel);
167 167
 
168 168
         $this->productRepository->add($product);
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      */
212 212
     public function thisProductHasAttributeWithValue(ProductInterface $product, $productAttributeType, $productAttributeName, $value)
213 213
     {
214
-        $attribute = $this->createProductAttribute($productAttributeType,$productAttributeName);
214
+        $attribute = $this->createProductAttribute($productAttributeType, $productAttributeName);
215 215
         $attributeValue = $this->createProductAttributeValue($value, $attribute);
216 216
         $product->addAttribute($attributeValue);
217 217
 
@@ -223,8 +223,8 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public function thisProductHasPercentAttributeWithValue(ProductInterface $product, $productAttributeName, $value)
225 225
     {
226
-        $attribute = $this->createProductAttribute('percent',$productAttributeName);
227
-        $attributeValue = $this->createProductAttributeValue($value/100, $attribute);
226
+        $attribute = $this->createProductAttribute('percent', $productAttributeName);
227
+        $attributeValue = $this->createProductAttributeValue($value / 100, $attribute);
228 228
         $product->addAttribute($attributeValue);
229 229
 
230 230
         $this->objectManager->flush();
@@ -287,9 +287,9 @@  discard block
 block discarded – undo
287 287
         $product->addOption($option);
288 288
         $product->setVariantSelectionMethod(ProductInterface::VARIANT_SELECTION_MATCH);
289 289
 
290
-        $this->sharedStorage->set(sprintf('%s_option',$optionName), $option);
291
-        $this->sharedStorage->set(sprintf('%s_option_value',$firstValue), $firstOptionValue);
292
-        $this->sharedStorage->set(sprintf('%s_option_value',$secondValue), $secondOptionValue);
290
+        $this->sharedStorage->set(sprintf('%s_option', $optionName), $option);
291
+        $this->sharedStorage->set(sprintf('%s_option_value', $firstValue), $firstOptionValue);
292
+        $this->sharedStorage->set(sprintf('%s_option_value', $secondValue), $secondOptionValue);
293 293
 
294 294
         $this->objectManager->persist($option);
295 295
         $this->objectManager->persist($firstOptionValue);
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
         /** @var ProductVariantInterface $variant */
306 306
         $variant = $this->productVariantFactory->createNew();
307 307
 
308
-        $optionValue = $this->sharedStorage->get(sprintf('%s_option_value',$optionValueName));
308
+        $optionValue = $this->sharedStorage->get(sprintf('%s_option_value', $optionValueName));
309 309
 
310 310
         $variant->addOption($optionValue);
311 311
         $variant->setPrice($price);
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Ui/Shop/CartContext.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         $this->summaryPage->open();
83 83
 
84 84
         Assert::true(
85
-             $this->summaryPage->isEmpty(),
85
+                $this->summaryPage->isEmpty(),
86 86
             'There should appear information about empty cart, but it does not.'
87 87
         );
88 88
     }
Please login to merge, or discard this patch.