Completed
Push — resource-classnames ( 503d2e )
by Kamil
18:12
created
src/Sylius/Bundle/LocaleBundle/DependencyInjection/Configuration.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 
12 12
 namespace Sylius\Bundle\LocaleBundle\DependencyInjection;
13 13
 
14
-use Sylius\Bundle\LocaleBundle\Form\Type\LocaleChoiceType;
15 14
 use Sylius\Bundle\LocaleBundle\Form\Type\LocaleType;
16 15
 use Sylius\Bundle\ResourceBundle\Controller\ResourceController;
17 16
 use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Setup/ProductContext.php 2 patches
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,6 +15,7 @@  discard block
 block discarded – undo
15 15
 use Behat\Gherkin\Node\TableNode;
16 16
 use Behat\Mink\Element\NodeElement;
17 17
 use Doctrine\Common\Persistence\ObjectManager;
18
+use Sylius\Behat\Service\SharedStorageInterface;
18 19
 use Sylius\Component\Attribute\Factory\AttributeFactoryInterface;
19 20
 use Sylius\Component\Core\Formatter\StringInflector;
20 21
 use Sylius\Component\Core\Model\ChannelInterface;
@@ -24,7 +25,6 @@  discard block
 block discarded – undo
24 25
 use Sylius\Component\Core\Model\ProductVariantInterface;
25 26
 use Sylius\Component\Core\Pricing\Calculators;
26 27
 use Sylius\Component\Core\Repository\ProductRepositoryInterface;
27
-use Sylius\Behat\Service\SharedStorageInterface;
28 28
 use Sylius\Component\Core\Uploader\ImageUploaderInterface;
29 29
 use Sylius\Component\Product\Factory\ProductFactoryInterface;
30 30
 use Sylius\Component\Product\Generator\SlugGeneratorInterface;
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 use Sylius\Component\Product\Model\ProductAttributeValueInterface;
33 33
 use Sylius\Component\Product\Model\ProductOptionInterface;
34 34
 use Sylius\Component\Product\Model\ProductOptionValueInterface;
35
+use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
35 36
 use Sylius\Component\Resource\Factory\FactoryInterface;
36
-use Sylius\Component\Shipping\Model\ShippingCategoryInterface;
37 37
 use Sylius\Component\Resource\Model\TranslationInterface;
38
+use Sylius\Component\Shipping\Model\ShippingCategoryInterface;
38 39
 use Sylius\Component\Taxation\Model\TaxCategoryInterface;
39
-use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
40 40
 use Symfony\Component\HttpFoundation\File\UploadedFile;
41 41
 
42 42
 /**
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             $channel = $this->sharedStorage->get('channel');
196 196
         }
197 197
         $product = $this->createProduct($productName, $price, null, $channel);
198
-        $product->setDescription('Awesome '.$productName);
198
+        $product->setDescription('Awesome ' . $productName);
199 199
 
200 200
         if (null !== $channel) {
201 201
             $product->addChannel($channel);
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
         /** @var ProductVariantInterface $productVariant */
251 251
         $productVariant = $this->defaultVariantResolver->getVariant($product);
252 252
 
253
-        $product->setDescription('Awesome '.$productName);
253
+        $product->setDescription('Awesome ' . $productName);
254 254
 
255 255
         foreach ($channels as $channel) {
256 256
             $product->addChannel($channel);
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         $product->setCode(StringInflector::nameToUppercaseCode($productName));
301 301
         $product->setSlug($this->slugGenerator->generate($productName));
302 302
 
303
-        $product->setDescription('Awesome '.$productName);
303
+        $product->setDescription('Awesome ' . $productName);
304 304
 
305 305
         if ($this->sharedStorage->has('channel')) {
306 306
             $channel = $this->sharedStorage->get('channel');
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
     public function thisProductHasPercentAttributeWithValue(ProductInterface $product, $productAttributeName, $value)
445 445
     {
446 446
         $attribute = $this->createProductAttribute('percent', $productAttributeName);
447
-        $attributeValue = $this->createProductAttributeValue($value/100, $attribute);
447
+        $attributeValue = $this->createProductAttributeValue($value / 100, $attribute);
448 448
         $product->addAttribute($attributeValue);
449 449
 
450 450
         $this->objectManager->flush();
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
     {
471 471
         $attribute = $this->createProductAttribute('percent', $productAttributeName);
472 472
         $attribute->setPosition($position);
473
-        $attributeValue = $this->createProductAttributeValue(rand(1, 100)/100, $attribute);
473
+        $attributeValue = $this->createProductAttributeValue(rand(1, 100) / 100, $attribute);
474 474
 
475 475
         $product->addAttribute($attributeValue);
476 476
 
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
 
661 661
         /** @var ImageInterface $productImage */
662 662
         $productImage = $this->productImageFactory->createNew();
663
-        $productImage->setFile(new UploadedFile($filesPath.$imagePath, basename($imagePath)));
663
+        $productImage->setFile(new UploadedFile($filesPath . $imagePath, basename($imagePath)));
664 664
         $productImage->setCode($imageCode);
665 665
         $this->imageUploader->upload($productImage);
666 666
 
Please login to merge, or discard this patch.
src/Sylius/Behat/Page/Admin/Product/UpdateSimpleProductPageInterface.php 1 patch
Doc Comments   +21 added lines patch added patch discarded remove patch
@@ -29,18 +29,21 @@  discard block
 block discarded – undo
29 29
     public function isCodeDisabled();
30 30
 
31 31
     /**
32
+     * @param string $locale
32 33
      * @return bool
33 34
      */
34 35
     public function isSlugReadOnlyIn($locale);
35 36
     
36 37
     /**
37 38
      * @param int $price
39
+     * @return void
38 40
      */
39 41
     public function specifyPrice($price);
40 42
 
41 43
     /**
42 44
      * @param string $name
43 45
      * @param string $localeCode
46
+     * @return void
44 47
      */
45 48
     public function nameItIn($name, $localeCode);
46 49
 
@@ -67,11 +70,18 @@  discard block
 block discarded – undo
67 70
 
68 71
     /**
69 72
      * @param TaxonInterface $taxon
73
+     * @return void
70 74
      */
71 75
     public function selectMainTaxon(TaxonInterface $taxon);
72 76
 
77
+    /**
78
+     * @return void
79
+     */
73 80
     public function disableTracking();
74 81
 
82
+    /**
83
+     * @return void
84
+     */
75 85
     public function enableTracking();
76 86
 
77 87
     /**
@@ -81,6 +91,7 @@  discard block
 block discarded – undo
81 91
 
82 92
     /**
83 93
      * @param string $locale
94
+     * @return void
84 95
      */
85 96
     public function enableSlugModification($locale);
86 97
 
@@ -94,20 +105,26 @@  discard block
 block discarded – undo
94 105
     /**
95 106
      * @param string $path
96 107
      * @param string $code
108
+     * @return void
97 109
      */
98 110
     public function attachImage($path, $code = null);
99 111
 
100 112
     /**
101 113
      * @param string $code
102 114
      * @param string $path
115
+     * @return void
103 116
      */
104 117
     public function changeImageWithCode($code, $path);
105 118
 
106 119
     /**
107 120
      * @param string $code
121
+     * @return void
108 122
      */
109 123
     public function removeImageWithCode($code);
110 124
 
125
+    /**
126
+     * @return void
127
+     */
111 128
     public function removeFirstImage();
112 129
 
113 130
     /**
@@ -130,6 +147,7 @@  discard block
 block discarded – undo
130 147
     /**
131 148
      * @param ProductAssociationTypeInterface $productAssociationType
132 149
      * @param string[] $productsNames
150
+     * @return void
133 151
      */
134 152
     public function associateProducts(ProductAssociationTypeInterface $productAssociationType, array $productsNames);
135 153
 
@@ -144,6 +162,7 @@  discard block
 block discarded – undo
144 162
     /**
145 163
      * @param string $productName
146 164
      * @param ProductAssociationTypeInterface $productAssociationType
165
+     * @return void
147 166
      */
148 167
     public function removeAssociatedProduct($productName, ProductAssociationTypeInterface $productAssociationType);
149 168
 
@@ -157,6 +176,7 @@  discard block
 block discarded – undo
157 176
 
158 177
     /**
159 178
      * @param string $locale
179
+     * @return void
160 180
      */
161 181
     public function activateLanguageTab($locale);
162 182
 
@@ -170,6 +190,7 @@  discard block
 block discarded – undo
170 190
     /**
171 191
      * @param string $slug
172 192
      * @param string $locale
193
+     * @return void
173 194
      */
174 195
     public function specifySlugIn($slug, $locale);
175 196
 }
Please login to merge, or discard this patch.
src/Sylius/Bundle/ReviewBundle/Form/Type/ReviewType.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 
14 14
 use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
15 15
 use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
16
-use Symfony\Component\Form\Extension\Core\Type\TextareaType;
17 16
 use Symfony\Component\Form\Extension\Core\Type\TextType;
17
+use Symfony\Component\Form\Extension\Core\Type\TextareaType;
18 18
 use Symfony\Component\Form\FormBuilderInterface;
19 19
 use Symfony\Component\OptionsResolver\OptionsResolver;
20 20
 use Symfony\Component\Validator\Constraints\Valid;
Please login to merge, or discard this patch.
src/Sylius/Bundle/TaxonomyBundle/DependencyInjection/Configuration.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -12,9 +12,6 @@
 block discarded – undo
12 12
 namespace Sylius\Bundle\TaxonomyBundle\DependencyInjection;
13 13
 
14 14
 use Sylius\Bundle\ResourceBundle\Controller\ResourceController;
15
-use Sylius\Bundle\ResourceBundle\Form\Type\ResourceFromIdentifierType;
16
-use Sylius\Bundle\ResourceBundle\Form\Type\ResourceToHiddenIdentifierType;
17
-use Sylius\Bundle\ResourceBundle\Form\Type\ResourceToIdentifierType;
18 15
 use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
19 16
 use Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonTranslationType;
20 17
 use Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonType;
Please login to merge, or discard this patch.
Sylius/Bundle/ReviewBundle/DependencyInjection/SyliusReviewExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     public function load(array $config, ContainerBuilder $container)
28 28
     {
29 29
         $config = $this->processConfiguration($this->getConfiguration($config, $container), $config);
30
-        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
30
+        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
31 31
 
32 32
         $loader->load('services.xml');
33 33
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         foreach ($resources as $subjectName => $subjectConfig) {
57 57
             foreach ($subjectConfig as $resourceName => $resourceConfig) {
58 58
                 if (is_array($resourceConfig)) {
59
-                    $resolvedResources[$subjectName.'_'.$resourceName] = $resourceConfig;
59
+                    $resolvedResources[$subjectName . '_' . $resourceName] = $resourceConfig;
60 60
                 }
61 61
             }
62 62
         }
Please login to merge, or discard this patch.
src/Sylius/Behat/Page/Admin/DashboardPageInterface.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -26,10 +26,14 @@
 block discarded – undo
26 26
      */
27 27
     public function checkValidationMessageFor($element, $message);
28 28
 
29
+    /**
30
+     * @return void
31
+     */
29 32
     public function reset();
30 33
 
31 34
     /**
32 35
      * @param string $email
36
+     * @return void
33 37
      */
34 38
     public function specifyEmail($email);
35 39
 }
Please login to merge, or discard this patch.
src/Sylius/Behat/Page/Admin/ShippingCategory/CreatePageInterface.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -27,6 +27,7 @@
 block discarded – undo
27 27
 
28 28
     /**
29 29
      * @param string $value
30
+     * @return void
30 31
      */
31 32
     public function setValue($value);
32 33
 }
Please login to merge, or discard this patch.
src/Sylius/Behat/Context/Setup/OrderContext.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
     ) {
369 369
         $customer = $user->getCustomer();
370 370
         for ($i = 0; $i < $numberOfOrders; $i++) {
371
-            $order = $this->createOrder($customer, '#00000'.$i);
371
+            $order = $this->createOrder($customer, '#00000' . $i);
372 372
             $this->checkoutUsing($order, $shippingMethod, clone $address, $paymentMethod);
373 373
             $this->applyPaymentTransitionOnOrder($order, PaymentTransitions::TRANSITION_COMPLETE);
374 374
 
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
         $total = $this->getPriceFromString($total);
416 416
 
417 417
         for ($i = 0; $i < $numberOfOrders; $i++) {
418
-            $order = $this->createOrder($customers[rand(0, $numberOfCustomers - 1)], '#'.uniqid());
418
+            $order = $this->createOrder($customers[rand(0, $numberOfCustomers - 1)], '#' . uniqid());
419 419
             $order->setState(OrderInterface::STATE_NEW); // Temporary, we should use checkout to place these orders.
420 420
             $this->applyPaymentTransitionOnOrder($order, PaymentTransitions::TRANSITION_COMPLETE);
421 421
 
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
         $total = $this->getPriceFromString($total);
446 446
 
447 447
         for ($i = 0; $i < $numberOfOrders; $i++) {
448
-            $order = $this->createOrder($customers[rand(0, $numberOfCustomers - 1)], '#'.uniqid(), $product->getChannels()->first());
448
+            $order = $this->createOrder($customers[rand(0, $numberOfCustomers - 1)], '#' . uniqid(), $product->getChannels()->first());
449 449
             $order->setState(OrderInterface::STATE_NEW);
450 450
             $this->applyPaymentTransitionOnOrder($order, PaymentTransitions::TRANSITION_COMPLETE);
451 451
 
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
             $customer = $this->customerFactory->createNew();
622 622
             $customer->setEmail(sprintf('john%[email protected]', uniqid()));
623 623
             $customer->setFirstname('John');
624
-            $customer->setLastname('Doe'.$i);
624
+            $customer->setLastname('Doe' . $i);
625 625
 
626 626
             $customers[] = $customer;
627 627
 
Please login to merge, or discard this patch.
Unused Use Statements   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,31 +14,30 @@
 block discarded – undo
14 14
 use Behat\Behat\Context\Context;
15 15
 use Doctrine\Common\Persistence\ObjectManager;
16 16
 use SM\Factory\FactoryInterface as StateMachineFactoryInterface;
17
+use Sylius\Behat\Service\SharedStorageInterface;
17 18
 use Sylius\Component\Core\Currency\CurrencyStorageInterface;
19
+use Sylius\Component\Core\Model\AddressInterface;
18 20
 use Sylius\Component\Core\Model\ChannelInterface;
19 21
 use Sylius\Component\Core\Model\ChannelPricingInterface;
20
-use Sylius\Component\Core\Model\PromotionCouponInterface;
21
-use Sylius\Component\Core\OrderCheckoutTransitions;
22
-use Sylius\Component\Order\Processor\OrderProcessorInterface;
23
-use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface;
24
-use Sylius\Component\Core\Model\AddressInterface;
25 22
 use Sylius\Component\Core\Model\OrderInterface;
26 23
 use Sylius\Component\Core\Model\OrderItemInterface;
27 24
 use Sylius\Component\Core\Model\ProductInterface;
28 25
 use Sylius\Component\Core\Model\ProductVariantInterface;
26
+use Sylius\Component\Core\Model\PromotionCouponInterface;
29 27
 use Sylius\Component\Core\Model\ShippingMethodInterface;
28
+use Sylius\Component\Core\OrderCheckoutTransitions;
30 29
 use Sylius\Component\Core\Repository\OrderRepositoryInterface;
31
-use Sylius\Behat\Service\SharedStorageInterface;
30
+use Sylius\Component\Customer\Model\CustomerInterface;
31
+use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface;
32 32
 use Sylius\Component\Order\OrderTransitions;
33
-use Sylius\Component\Payment\Model\PaymentInterface;
33
+use Sylius\Component\Order\Processor\OrderProcessorInterface;
34 34
 use Sylius\Component\Payment\Model\PaymentMethodInterface;
35 35
 use Sylius\Component\Payment\PaymentTransitions;
36
+use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
36 37
 use Sylius\Component\Resource\Factory\FactoryInterface;
37 38
 use Sylius\Component\Resource\Repository\RepositoryInterface;
38 39
 use Sylius\Component\Shipping\ShipmentTransitions;
39
-use Sylius\Component\Customer\Model\CustomerInterface;
40 40
 use Sylius\Component\User\Model\UserInterface;
41
-use Sylius\Component\Product\Resolver\ProductVariantResolverInterface;
42 41
 
43 42
 /**
44 43
  * @author Łukasz Chruściel <[email protected]>
Please login to merge, or discard this patch.