Completed
Push — scrutinizer/config ( 29beaa...14e91e )
by Kamil
54:29 queued 18:47
created
Bundle/ArchetypeBundle/DependencyInjection/SyliusArchetypeExtension.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
     /**
120 120
      * @param array $config
121 121
      *
122
-     * @return array
122
+     * @return ContainerBuilder
123 123
      */
124 124
     private function defineDefaultOrmRepository(array $config)
125 125
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function load(array $config, ContainerBuilder $container)
35 35
     {
36 36
         $config = $this->processConfiguration($this->getConfiguration($config, $container), $config);
37
-        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
37
+        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
38 38
 
39 39
         if (SyliusResourceBundle::DRIVER_DOCTRINE_ORM === $config['driver']) {
40 40
             $config = $this->defineDefaultOrmRepository($config);
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
                     continue;
49 49
                 }
50 50
 
51
-                $formDefinition = $container->getDefinition('sylius.form.type.'.$subjectName.'_'.$resourceName);
51
+                $formDefinition = $container->getDefinition('sylius.form.type.' . $subjectName . '_' . $resourceName);
52 52
                 $formDefinition->addArgument($subjectName);
53 53
 
54 54
                 if (isset($resourceConfig['translation'])) {
55
-                    $formTranslationDefinition = $container->getDefinition('sylius.form.type.'.$subjectName.'_'.$resourceName.'_translation');
55
+                    $formTranslationDefinition = $container->getDefinition('sylius.form.type.' . $subjectName . '_' . $resourceName . '_translation');
56 56
                     $formTranslationDefinition->addArgument($subjectName);
57 57
                 }
58 58
             }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
             foreach ($subjectConfig as $resourceName => $resourceConfig) {
94 94
                 if (is_array($resourceConfig)) {
95
-                    $resolvedResources[$subjectName.'_'.$resourceName] = $resourceConfig;
95
+                    $resolvedResources[$subjectName . '_' . $resourceName] = $resourceConfig;
96 96
                 }
97 97
             }
98 98
         }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             ->setArguments([new Reference(sprintf('sylius.factory.%s_attribute_value', $subjectName))])
114 114
         ;
115 115
 
116
-        $container->setDefinition('sylius.builder.'.$subjectName.'_archetype', $builderDefinition);
116
+        $container->setDefinition('sylius.builder.' . $subjectName . '_archetype', $builderDefinition);
117 117
     }
118 118
 
119 119
     /**
Please login to merge, or discard this patch.
src/Sylius/Bundle/CartBundle/Controller/CartItemController.php 1 patch
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -83,7 +83,6 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * Redirect to specific URL or to cart.
85 85
      *
86
-     * @param Request $request
87 86
      *
88 87
      * @return RedirectResponse
89 88
      */
@@ -105,7 +104,6 @@  discard block
 block discarded – undo
105 104
      * If the item is found and the current user cart contains that item,
106 105
      * it will be removed and the cart - refreshed and saved.
107 106
      *
108
-     * @param mixed $id
109 107
      *
110 108
      * @return Response
111 109
      */
Please login to merge, or discard this patch.
src/Sylius/Bundle/CartBundle/Templating/Helper/CartHelper.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
     }
57 57
 
58 58
     /**
59
-     * @return CartInterface|null
59
+     * @return CartInterface
60 60
      */
61 61
     public function getCurrentCart()
62 62
     {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@
 block discarded – undo
12 12
 namespace spec\Sylius\Component\Core\Promotion\Action;
13 13
 
14 14
 use PhpSpec\ObjectBehavior;
15
-use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface;
16 15
 use Sylius\Component\Core\Model\OrderInterface;
17 16
 use Sylius\Component\Core\Model\OrderItemInterface;
18 17
 use Sylius\Component\Core\Model\ProductVariantInterface;
18
+use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface;
19 19
 use Sylius\Component\Promotion\Action\PromotionActionInterface;
20 20
 use Sylius\Component\Promotion\Model\PromotionInterface;
21 21
 use Sylius\Component\Resource\Factory\FactoryInterface;
Please login to merge, or discard this patch.
src/Sylius/Bundle/CartBundle/Twig/CartExtension.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
     /**
53 53
      * Returns current cart.
54 54
      *
55
-     * @return null|CartInterface
55
+     * @return CartInterface
56 56
      */
57 57
     public function getCurrentCart()
58 58
     {
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@
 block discarded – undo
43 43
     public function getFunctions()
44 44
     {
45 45
         return [
46
-             new \Twig_SimpleFunction('sylius_cart_exists', [$this, 'hasCart']),
47
-             new \Twig_SimpleFunction('sylius_cart_get', [$this, 'getCurrentCart']),
48
-             new \Twig_SimpleFunction('sylius_cart_form', [$this, 'getItemFormView']),
46
+                new \Twig_SimpleFunction('sylius_cart_exists', [$this, 'hasCart']),
47
+                new \Twig_SimpleFunction('sylius_cart_get', [$this, 'getCurrentCart']),
48
+                new \Twig_SimpleFunction('sylius_cart_form', [$this, 'getItemFormView']),
49 49
         ];
50 50
     }
51 51
 
Please login to merge, or discard this patch.
src/Sylius/Bundle/ChannelBundle/Behat/ChannelContext.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -21,6 +21,7 @@  discard block
 block discarded – undo
21 21
 {
22 22
     /**
23 23
      * @Given /^all products are assigned to "([^""]*)" channel$/
24
+     * @param string $code
24 25
      */
25 26
     public function assignChannelToProducts($code)
26 27
     {
@@ -63,6 +64,7 @@  discard block
 block discarded – undo
63 64
 
64 65
     /**
65 66
      * @Given /^all promotions are assigned to "([^""]*)" channel$/
67
+     * @param string $code
66 68
      */
67 69
     public function assignChannelToPromotions($code)
68 70
     {
@@ -116,6 +118,7 @@  discard block
 block discarded – undo
116 118
 
117 119
     /**
118 120
      * @Given /^channel "([^""]*)" has following configuration:$/
121
+     * @param string $code
119 122
      */
120 123
     public function channelHasFollowingConfiguration($code, TableNode $table)
121 124
     {
Please login to merge, or discard this patch.
src/Sylius/Bundle/CoreBundle/Behat/CoreContext.php 1 patch
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -287,6 +287,10 @@  discard block
 block discarded – undo
287 287
         $manager->flush();
288 288
     }
289 289
 
290
+    /**
291
+     * @param string $role
292
+     * @param \DateTime $createdAt
293
+     */
290 294
     public function thereIsUser($email, $password, $role = null, $enabled = 'yes', $address = null, $groups = [], $flush = true, array $authorizationRoles = [], $createdAt = null)
291 295
     {
292 296
         if (null !== $user = $this->getRepository('user')->findOneByEmail($email)) {
@@ -304,6 +308,11 @@  discard block
 block discarded – undo
304 308
         return $user;
305 309
     }
306 310
 
311
+    /**
312
+     * @param \DateTime $createdAt
313
+     *
314
+     * @return null|\Sylius\Component\User\Model\CustomerInterface
315
+     */
307 316
     protected function thereIsCustomer($email, $address = null, $groups = [], $flush = true, $createdAt = null)
308 317
     {
309 318
         if (null !== $customer = $this->getRepository('customer')->findOneByEmail($email)) {
Please login to merge, or discard this patch.
src/Sylius/Bundle/CoreBundle/Behat/MetadataContext.php 1 patch
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -178,6 +178,7 @@  discard block
 block discarded – undo
178 178
 
179 179
     /**
180 180
      * @Given there is the following metadata :metadataName:
181
+     * @param string $metadataName
181 182
      */
182 183
     public function thereIsTheFollowingMetadata($metadataName, TableNode $table)
183 184
     {
@@ -303,7 +304,7 @@  discard block
 block discarded – undo
303 304
 
304 305
     /**
305 306
      * @param ElementInterface $element
306
-     * @param array $fields
307
+     * @param string[] $fields
307 308
      *
308 309
      * @throws \Exception If assertion failed
309 310
      */
@@ -318,7 +319,7 @@  discard block
 block discarded – undo
318 319
      * @param ElementInterface $element
319 320
      * @param string[] $fields
320 321
      *
321
-     * @return ElementInterface|null
322
+     * @return NodeElement|null
322 323
      */
323 324
     private function getFormWithFields(ElementInterface $element, array $fields)
324 325
     {
@@ -344,7 +345,7 @@  discard block
 block discarded – undo
344 345
     /**
345 346
      * @param string $value
346 347
      *
347
-     * @return CardInterface
348
+     * @return null|CardInterface
348 349
      */
349 350
     protected function createTwitterCardFromString($value)
350 351
     {
Please login to merge, or discard this patch.
src/Sylius/Bundle/CoreBundle/Checkout/Step/SecurityStep.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
     }
110 110
 
111 111
     /**
112
-     * @return FormInterface|null
112
+     * @return null|\Symfony\Component\Form\Form
113 113
      */
114 114
     protected function getGuestForm()
115 115
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -16,8 +16,6 @@
 block discarded – undo
16 16
 use Sylius\Component\Core\Model\CustomerInterface;
17 17
 use Sylius\Component\Core\Model\OrderInterface;
18 18
 use Sylius\Component\Core\Model\UserInterface;
19
-use Sylius\Component\Core\OrderCheckoutStates;
20
-use Sylius\Component\Core\OrderCheckoutTransitions;
21 19
 use Sylius\Component\Core\SyliusCheckoutEvents;
22 20
 use Sylius\Component\Resource\Event\ResourceEvent;
23 21
 use Sylius\Component\Resource\Model\ResourceInterface;
Please login to merge, or discard this patch.
src/Sylius/Bundle/CoreBundle/Controller/ProductController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -306,7 +306,7 @@
 block discarded – undo
306 306
      * @param RequestConfiguration $configuration
307 307
      * @param TaxonInterface $taxon
308 308
      * @param Pagerfanta $results
309
-     * @param mixed $template
309
+     * @param string $template
310 310
      * @param mixed $page
311 311
      * @param mixed|null $facets
312 312
      * @param mixed|null $facetTags
Please login to merge, or discard this patch.