@@ -11,7 +11,6 @@ |
||
11 | 11 | |
12 | 12 | namespace Sylius\Bundle\ProductBundle\DependencyInjection; |
13 | 13 | |
14 | -use Sylius\Bundle\CoreBundle\Form\Type\LegacyProductType; |
|
15 | 14 | use Sylius\Bundle\ProductBundle\Form\Type\ProductTranslationType; |
16 | 15 | use Sylius\Bundle\ProductBundle\Form\Type\ProductType; |
17 | 16 | use Sylius\Bundle\ProductBundle\Form\Type\ProductVariantGenerationType; |
@@ -30,7 +30,6 @@ |
||
30 | 30 | use Sylius\Component\Product\Model\OptionValueTranslationInterface; |
31 | 31 | use Sylius\Component\Product\Model\Variant; |
32 | 32 | use Sylius\Component\Product\Model\VariantInterface; |
33 | -use Sylius\Component\Resource\Factory; |
|
34 | 33 | use Symfony\Component\Config\FileLocator; |
35 | 34 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
36 | 35 | use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface; |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function load(array $config, ContainerBuilder $container) |
30 | 30 | { |
31 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
31 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
32 | 32 | $loader->load('services.xml'); |
33 | 33 | $loader->load('twig.xml'); |
34 | 34 | } |
@@ -16,11 +16,9 @@ |
||
16 | 16 | use Sylius\Bundle\PromotionBundle\Form\EventListener\BuildActionFormSubscriber; |
17 | 17 | use Sylius\Bundle\PromotionBundle\Form\Type\ActionType; |
18 | 18 | use Sylius\Bundle\PromotionBundle\Form\Type\Core\AbstractConfigurationType; |
19 | -use Sylius\Component\Promotion\Model\ActionInterface; |
|
20 | 19 | use Sylius\Component\Registry\ServiceRegistryInterface; |
21 | 20 | use Symfony\Component\Form\FormBuilder; |
22 | 21 | use Symfony\Component\Form\FormFactoryInterface; |
23 | -use Symfony\Component\OptionsResolver\OptionsResolver; |
|
24 | 22 | |
25 | 23 | /** |
26 | 24 | * @author Saša Stamenković <[email protected]> |
@@ -14,8 +14,8 @@ |
||
14 | 14 | use Doctrine\ORM\AbstractQuery; |
15 | 15 | use Doctrine\ORM\EntityManager; |
16 | 16 | use Doctrine\ORM\Mapping\ClassMetadata; |
17 | -use Doctrine\ORM\Query\Expr; |
|
18 | 17 | use Doctrine\ORM\QueryBuilder; |
18 | +use Doctrine\ORM\Query\Expr; |
|
19 | 19 | use PhpSpec\ObjectBehavior; |
20 | 20 | use Prophecy\Argument; |
21 | 21 | use Sylius\Component\Rbac\Model\RoleInterface; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | * |
49 | 49 | * @param string $permissionCode |
50 | 50 | * |
51 | - * @return string |
|
51 | + * @return boolean |
|
52 | 52 | */ |
53 | 53 | public function isGranted($permissionCode) |
54 | 54 | { |
@@ -101,7 +101,7 @@ |
||
101 | 101 | * @param string $interval |
102 | 102 | * @param string $periodFormat |
103 | 103 | * @param string $presentationFormat |
104 | - * @param array $groupBy |
|
104 | + * @param string[] $groupBy |
|
105 | 105 | */ |
106 | 106 | private function setExtraConfiguration( |
107 | 107 | array &$configuration, |
@@ -102,7 +102,7 @@ |
||
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 | { |
@@ -11,11 +11,11 @@ |
||
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]> |
@@ -46,6 +46,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | { |
@@ -149,7 +149,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -80,6 +80,7 @@ |
||
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 | { |
@@ -85,11 +85,11 @@ |
||
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 | /** |