Completed
Push — fixtures/parameter-fix ( 1f3fd9...164a01 )
by Kamil
32:45
created
src/Sylius/Bundle/ResourceBundle/Behat/FormContext.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
      * @param  string           $label
103 103
      * @param  string           $collectionSelector
104 104
      *
105
-     * @return NodeElement|null
105
+     * @return NodeElement
106 106
      */
107 107
     protected function isInvalidCollectionField($position, $label, $collectionSelector = null)
108 108
     {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 
12 12
 namespace Sylius\Bundle\ResourceBundle\Behat;
13 13
 
14
+use Behat\MinkExtension\Context\RawMinkContext;
14 15
 use Behat\Mink\Element\Element;
15 16
 use Behat\Mink\Element\NodeElement;
16 17
 use Behat\Mink\Exception\ElementNotFoundException;
17 18
 use Behat\Mink\Selector\Xpath\Escaper;
18
-use Behat\MinkExtension\Context\RawMinkContext;
19 19
 
20 20
 /**
21 21
  * @author Arnaud Langlade <[email protected]>
Please login to merge, or discard this patch.
src/Sylius/Bundle/ResourceBundle/Behat/WebContext.php 2 patches
Doc Comments   +14 added lines patch added patch discarded remove patch
@@ -46,6 +46,8 @@  discard block
 block discarded – undo
46 46
     /**
47 47
      * @Given /^I am on the page of ([^""]*) with ([^""]*) "([^""]*)"$/
48 48
      * @Given /^I go to the page of ([^""]*) with ([^""]*) "([^""]*)"$/
49
+     * @param string $type
50
+     * @param string $property
49 51
      */
50 52
     public function iAmOnTheResourcePage($type, $property, $value)
51 53
     {
@@ -82,6 +84,8 @@  discard block
 block discarded – undo
82 84
     /**
83 85
      * @Then /^I should be on the page of ([^""]*) with ([^""]*) "([^""]*)"$/
84 86
      * @Then /^I should still be on the page of ([^""]*) with ([^""]*) "([^""]*)"$/
87
+     * @param string $type
88
+     * @param string $property
85 89
      */
86 90
     public function iShouldBeOnTheResourcePage($type, $property, $value)
87 91
     {
@@ -125,6 +129,7 @@  discard block
 block discarded – undo
125 129
 
126 130
     /**
127 131
      * @Given /^I am (building|viewing|editing) ([^""]*) with ([^""]*) "([^""]*)"$/
132
+     * @param string $property
128 133
      */
129 134
     public function iAmDoingSomethingWithResource($action, $type, $property, $value)
130 135
     {
@@ -167,6 +172,9 @@  discard block
 block discarded – undo
167 172
 
168 173
     /**
169 174
      * @Then /^I should be (building|viewing|editing) ([^"]*) with ([^"]*) "([^""]*)"$/
175
+     * @param string $action
176
+     * @param string $type
177
+     * @param string $property
170 178
      */
171 179
     public function iShouldBeDoingSomethingWithResource($action, $type, $property, $value)
172 180
     {
@@ -221,6 +229,7 @@  discard block
 block discarded – undo
221 229
 
222 230
     /**
223 231
      * @When /^I click "([^"]+)"$/
232
+     * @param string $link
224 233
      */
225 234
     public function iClick($link)
226 235
     {
@@ -470,6 +479,7 @@  discard block
 block discarded – undo
470 479
 
471 480
     /**
472 481
      * @Given /^I wait (\d+) (seconds|second)$/
482
+     * @param integer $time
473 483
      */
474 484
     public function iWait($time)
475 485
     {
@@ -540,6 +550,8 @@  discard block
 block discarded – undo
540 550
 
541 551
     /**
542 552
      * @Then /^I should see ([\w\s]+) "([^""]*)" as available choice$/
553
+     * @param string $fieldName
554
+     * @param string $fieldOption
543 555
      */
544 556
     public function iShouldSeeSelectWithOption($fieldName, $fieldOption)
545 557
     {
@@ -625,6 +637,8 @@  discard block
 block discarded – undo
625 637
 
626 638
     /**
627 639
      * @Then /^I should see select "([^"]*)" with "([^"]*)" option selected$/
640
+     * @param string $fieldName
641
+     * @param string $fieldOption
628 642
      */
629 643
     public function iShouldSeeSelectWithOptionSelected($fieldName, $fieldOption)
630 644
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
             return;
150 150
         }
151 151
 
152
-        if('product option' === $type) {
152
+        if ('product option' === $type) {
153 153
             $this->iAmDoingSomethingWithResource($action, $type, 'code', $name);
154 154
 
155 155
             return;
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
     {
328 328
         $tableNode = new TableNode([
329 329
             [trim($columnName)],
330
-            [trim('%'.$value.'%')],
330
+            [trim('%' . $value . '%')],
331 331
         ]);
332 332
 
333 333
         $this->iShouldSeeTheFollowingRow($tableNode);
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
     {
343 343
         $tableNode = new TableNode([
344 344
             [trim($columnName)],
345
-            [trim('%'.$value.'%')],
345
+            [trim('%' . $value . '%')],
346 346
         ]);
347 347
 
348 348
         $this->iShouldNotSeeTheFollowingRow($tableNode);
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
         $this->waitForModalToAppear($attributesModalContainer);
442 442
 
443 443
         foreach ($attributes as $attribute) {
444
-            $this->getSession()->getPage()->checkField($attribute.' attribute');
444
+            $this->getSession()->getPage()->checkField($attribute . ' attribute');
445 445
         }
446 446
 
447 447
         $addAttributesButton->press();
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
         $this->assertSession()->elementExists('css', '#attribute-types-modal');
462 462
 
463 463
         $attributeTypesModalContainer = $this->getSession()->getPage()->find('css', '#attribute-types-modal');
464
-        $typeButton = $attributeTypesModalContainer->find('css', 'a#'.$type);
464
+        $typeButton = $attributeTypesModalContainer->find('css', 'a#' . $type);
465 465
 
466 466
         $this->waitForModalToAppear($attributeTypesModalContainer);
467 467
 
Please login to merge, or discard this patch.
src/Sylius/Bundle/ResourceBundle/Controller/RedirectHandler.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -80,6 +80,7 @@
 block discarded – undo
80 80
 
81 81
     /**
82 82
      * {@inheritdoc}
83
+     * @param string|null $url
83 84
      */
84 85
     public function redirect(RequestConfiguration $configuration, $url, $status = 302)
85 86
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,11 +85,11 @@
 block discarded – undo
85 85
     {
86 86
         if ($configuration->isHeaderRedirection()) {
87 87
             return new Response('', 200, [
88
-                'X-SYLIUS-LOCATION' => $url.$configuration->getRedirectHash(),
88
+                'X-SYLIUS-LOCATION' => $url . $configuration->getRedirectHash(),
89 89
             ]);
90 90
         }
91 91
 
92
-        return new RedirectResponse($url.$configuration->getRedirectHash(), $status);
92
+        return new RedirectResponse($url . $configuration->getRedirectHash(), $status);
93 93
     }
94 94
 
95 95
     /**
Please login to merge, or discard this patch.
src/Sylius/Bundle/ResourceBundle/Controller/RequestConfiguration.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     /**
95 95
      * @param $name
96 96
      *
97
-     * @return null|string
97
+     * @return string
98 98
      */
99 99
     public function getDefaultTemplate($name)
100 100
     {
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     }
227 227
 
228 228
     /**
229
-     * @param object|null $resource
229
+     * @param \Sylius\Component\Resource\Model\ResourceInterface|null $resource
230 230
      *
231 231
      * @return array
232 232
      */
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     }
346 346
 
347 347
     /**
348
-     * @param $parameter
348
+     * @param string $parameter
349 349
      * @param array $defaults
350 350
      *
351 351
      * @return array
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
     }
406 406
 
407 407
     /**
408
-     * @return array
408
+     * @return callable
409 409
      */
410 410
     public function getFactoryArguments()
411 411
     {
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
     }
450 450
 
451 451
     /**
452
-     * @return mixed|null
452
+     * @return string
453 453
      */
454 454
     public function getSerializationVersion()
455 455
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function getRouteName($name)
160 160
     {
161
-        $sectionPrefix = $this->getSection() ? $this->getSection().'_' : '';
161
+        $sectionPrefix = $this->getSection() ? $this->getSection() . '_' : '';
162 162
 
163 163
         return sprintf('%s_%s%s_%s', $this->metadata->getApplicationName(), $sectionPrefix, $this->metadata->getName(), $name);
164 164
     }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
             return null;
201 201
         }
202 202
 
203
-        return '#'.$redirect['hash'];
203
+        return '#' . $redirect['hash'];
204 204
     }
205 205
 
206 206
     /**
Please login to merge, or discard this patch.
src/Sylius/Bundle/ResourceBundle/Controller/ResourceController.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -433,7 +433,7 @@
 block discarded – undo
433 433
 
434 434
     /**
435 435
      * @param Request $request
436
-     * @param $enabled
436
+     * @param boolean $enabled
437 437
      *
438 438
      * @return RedirectResponse
439 439
      */
Please login to merge, or discard this patch.
Bundle/ResourceBundle/DependencyInjection/SyliusResourceExtension.php 2 patches
Unused Use Statements   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,14 +13,12 @@
 block discarded – undo
13 13
 
14 14
 use Sylius\Bundle\ResourceBundle\DependencyInjection\Driver\DriverProvider;
15 15
 use Sylius\Component\Resource\Metadata\Metadata;
16
-use Symfony\Component\Config\Definition\Processor;
17 16
 use Symfony\Component\Config\FileLocator;
17
+use Symfony\Component\Config\Loader\LoaderInterface;
18 18
 use Symfony\Component\DependencyInjection\ContainerBuilder;
19
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
19 20
 use Symfony\Component\DependencyInjection\Extension\Extension;
20
-use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
21 21
 use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
22
-use Symfony\Component\Config\Loader\LoaderInterface;
23
-use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
24 22
 
25 23
 /**
26 24
  * @author Paweł Jędrzejewski <[email protected]>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 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
         $configFiles = [
40 40
             'services.xml',
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             DriverProvider::get($metadata)->load($container, $metadata);
98 98
 
99 99
             if ($metadata->hasParameter('translation')) {
100
-                $alias = $alias.'_translation';
100
+                $alias = $alias . '_translation';
101 101
                 $resourceConfig = array_merge(['driver' => $resourceConfig['driver']], $resourceConfig['translation']);
102 102
 
103 103
                 $resources = $container->hasParameter('sylius.resources') ? $container->getParameter('sylius.resources') : [];
Please login to merge, or discard this patch.
ResourceBundle/Doctrine/ODM/PHPCR/EventListener/DefaultParentListener.php 2 patches
Unused Use Statements   +1 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,12 +2,9 @@
 block discarded – undo
2 2
 
3 3
 namespace Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\EventListener;
4 4
 
5
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
6
-use Symfony\Component\Form\FormEvents;
7
-use Symfony\Component\Form\FormEvent;
8 5
 use Doctrine\ODM\PHPCR\DocumentManagerInterface;
9
-use PHPCR\Util\NodeHelper;
10 6
 use Doctrine\ODM\PHPCR\Mapping\ClassMetadata;
7
+use PHPCR\Util\NodeHelper;
11 8
 use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent;
12 9
 
13 10
 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@  discard block
 block discarded – undo
62 62
     function it_filters_data_containing_empty_strings(
63 63
         DataSourceInterface $dataSource,
64 64
         ExpressionBuilderInterface $expressionBuilder
65
-    )
66
-    {
65
+    ) {
67 66
         $dataSource->getExpressionBuilder()->willReturn($expressionBuilder);
68 67
 
69 68
         $expressionBuilder->isNull('firstName')->willReturn('EXPR');
@@ -87,8 +86,7 @@  discard block
 block discarded – undo
87 86
     function it_filters_data_containing_a_string(
88 87
         DataSourceInterface $dataSource,
89 88
         ExpressionBuilderInterface $expressionBuilder
90
-    )
91
-    {
89
+    ) {
92 90
         $dataSource->getExpressionBuilder()->willReturn($expressionBuilder);
93 91
 
94 92
         $expressionBuilder->like('firstName', '%John%')->willReturn('EXPR');
Please login to merge, or discard this patch.
ResourceBundle/Doctrine/ODM/PHPCR/EventListener/NameFilterListener.php 2 patches
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -11,12 +11,7 @@
 block discarded – undo
11 11
 
12 12
 namespace Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\EventListener;
13 13
 
14
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
15
-use Symfony\Component\Form\FormEvents;
16
-use Symfony\Component\Form\FormEvent;
17 14
 use Doctrine\ODM\PHPCR\DocumentManagerInterface;
18
-use PHPCR\Util\NodeHelper;
19
-use Doctrine\ODM\PHPCR\Mapping\ClassMetadata;
20 15
 use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent;
21 16
 
22 17
 /**
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@
 block discarded – undo
65 65
 
66 66
     function is_configures_options(
67 67
         OptionsResolver $resolver
68
-    )
69
-    {
68
+    ) {
70 69
         $resolver->setDefaults([
71 70
             'format' => 'Y:m:d H:i:s'
72 71
         ])->shouldBeCalled();
Please login to merge, or discard this patch.
ResourceBundle/Doctrine/ODM/PHPCR/EventListener/NameResolverListener.php 2 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -11,11 +11,7 @@
 block discarded – undo
11 11
 
12 12
 namespace Sylius\Bundle\ResourceBundle\Doctrine\ODM\PHPCR\EventListener;
13 13
 
14
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
15
-use Symfony\Component\Form\FormEvents;
16
-use Symfony\Component\Form\FormEvent;
17 14
 use Doctrine\ODM\PHPCR\DocumentManagerInterface;
18
-use PHPCR\Util\NodeHelper;
19 15
 use Doctrine\ODM\PHPCR\Mapping\ClassMetadata;
20 16
 use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent;
21 17
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@
 block discarded – undo
65 65
 
66 66
     function is_configures_options(
67 67
         OptionsResolver $resolver
68
-    )
69
-    {
68
+    ) {
70 69
         $resolver->setDefaults([
71 70
             'format' => 'Y:m:d H:i:s'
72 71
         ])->shouldBeCalled();
Please login to merge, or discard this patch.