@@ -50,7 +50,7 @@ |
||
50 | 50 | $metadata->idGenerator = 'foo'; |
51 | 51 | |
52 | 52 | $this->shouldThrow(new \RuntimeException('Document of class "stdClass" must be using the GENERATOR_TYPE_PARENT identificatio strategy (value 3), it is current using "foo" (this may be an automatic configuration: be sure to map both the `nodename` and the `parentDocument`).'))->during( |
53 | - 'onEvent', [ $event ] |
|
53 | + 'onEvent', [$event] |
|
54 | 54 | ); |
55 | 55 | } |
56 | 56 |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | 'A default parent path has been specified, but no parent mapping has been applied to document "stdClass"' |
59 | 59 | ))->during( |
60 | 60 | 'onPreCreate', |
61 | - [ $event ] |
|
61 | + [$event] |
|
62 | 62 | ); |
63 | 63 | } |
64 | 64 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | 'Document at default parent path "/path/to" does not exist. `autocreate` was set to "false"' |
85 | 85 | ))->during( |
86 | 86 | 'onPreCreate', |
87 | - [ $event ] |
|
87 | + [$event] |
|
88 | 88 | ); |
89 | 89 | } |
90 | 90 |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | */ |
133 | 133 | public function hasItemNamed($name) |
134 | 134 | { |
135 | - return $this->hasItemWith($name, '.sylius-product-name'); |
|
135 | + return $this->hasItemWith($name, '.sylius-product-name'); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | */ |
141 | 141 | public function hasItemWithVariantNamed($variantName) |
142 | 142 | { |
143 | - return $this->hasItemWith($variantName, '.sylius-product-variant-name'); |
|
143 | + return $this->hasItemWith($variantName, '.sylius-product-variant-name'); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
@@ -227,7 +227,7 @@ |
||
227 | 227 | { |
228 | 228 | $cartTotalText = $this->getElement('cart_total')->getText(); |
229 | 229 | |
230 | - if (strpos($cartTotalText, ',') !== false ) { |
|
230 | + if (strpos($cartTotalText, ',') !== false) { |
|
231 | 231 | return strstr($cartTotalText, ',', true); |
232 | 232 | } |
233 | 233 |
@@ -18,8 +18,8 @@ |
||
18 | 18 | use Behat\Testwork\Environment\Handler\EnvironmentHandler; |
19 | 19 | use Behat\Testwork\Suite\Exception\SuiteConfigurationException; |
20 | 20 | use Behat\Testwork\Suite\Suite; |
21 | -use Sylius\Behat\Extension\MultiContainerExtension\Context\Environment\UninitializedContextServiceEnvironment; |
|
22 | 21 | use Sylius\Behat\Extension\MultiContainerExtension\ContextRegistry; |
22 | +use Sylius\Behat\Extension\MultiContainerExtension\Context\Environment\UninitializedContextServiceEnvironment; |
|
23 | 23 | use Symfony\Component\DependencyInjection\ContainerInterface; |
24 | 24 | |
25 | 25 | /** |
@@ -77,7 +77,7 @@ |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
80 | - * @return array[] |
|
80 | + * @return integer[] |
|
81 | 81 | */ |
82 | 82 | public function getContextsServicesIds() |
83 | 83 | { |
@@ -415,9 +415,9 @@ |
||
415 | 415 | * Get child elements by name. |
416 | 416 | * |
417 | 417 | * @param \DOMNode $node |
418 | - * @param mixed $name |
|
418 | + * @param string $name |
|
419 | 419 | * |
420 | - * @return array |
|
420 | + * @return string |
|
421 | 421 | */ |
422 | 422 | private function getChildren(\DOMNode $node, $name) |
423 | 423 | { |
@@ -15,15 +15,15 @@ |
||
15 | 15 | use Symfony\Component\Config\FileLocatorInterface; |
16 | 16 | use Symfony\Component\Config\Resource\FileResource; |
17 | 17 | use Symfony\Component\Config\Util\XmlUtils; |
18 | +use Symfony\Component\DependencyInjection\Alias; |
|
18 | 19 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
19 | -use Symfony\Component\DependencyInjection\DefinitionDecorator; |
|
20 | 20 | use Symfony\Component\DependencyInjection\ContainerInterface; |
21 | -use Symfony\Component\DependencyInjection\Alias; |
|
22 | 21 | use Symfony\Component\DependencyInjection\Definition; |
23 | -use Symfony\Component\DependencyInjection\Loader\FileLoader; |
|
24 | -use Symfony\Component\DependencyInjection\Reference; |
|
22 | +use Symfony\Component\DependencyInjection\DefinitionDecorator; |
|
25 | 23 | use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; |
26 | 24 | use Symfony\Component\DependencyInjection\Exception\RuntimeException; |
25 | +use Symfony\Component\DependencyInjection\Loader\FileLoader; |
|
26 | +use Symfony\Component\DependencyInjection\Reference; |
|
27 | 27 | use Symfony\Component\ExpressionLanguage\Expression; |
28 | 28 | |
29 | 29 | /** |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | if (in_array($key, ['factory-class', 'factory-method', 'factory-service'])) { |
178 | 178 | @trigger_error(sprintf('The "%s" attribute of service "%s" in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use the "factory" element instead.', $key, (string) $service->getAttribute('id'), $file), E_USER_DEPRECATED); |
179 | 179 | } |
180 | - $method = 'set'.str_replace('-', '', $key); |
|
180 | + $method = 'set' . str_replace('-', '', $key); |
|
181 | 181 | $definition->$method(XmlUtils::phpize($value)); |
182 | 182 | } |
183 | 183 | } |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | // this is used by DefinitionDecorator to overwrite a specific |
385 | 385 | // argument of the parent definition |
386 | 386 | if ($arg->hasAttribute('index')) { |
387 | - $key = 'index_'.$arg->getAttribute('index'); |
|
387 | + $key = 'index_' . $arg->getAttribute('index'); |
|
388 | 388 | } |
389 | 389 | |
390 | 390 | switch ($arg->getAttribute('type')) { |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | */ |
443 | 443 | public function validateSchema(\DOMDocument $dom) |
444 | 444 | { |
445 | - $schemaLocations = ['http://symfony.com/schema/dic/services' => str_replace('\\', '/', __DIR__.'/schema/dic/services/services-1.0.xsd')]; |
|
445 | + $schemaLocations = ['http://symfony.com/schema/dic/services' => str_replace('\\', '/', __DIR__ . '/schema/dic/services/services-1.0.xsd')]; |
|
446 | 446 | |
447 | 447 | if ($element = $dom->documentElement->getAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation')) { |
448 | 448 | $items = preg_split('/\s+/', $element); |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | } |
453 | 453 | |
454 | 454 | if (($extension = $this->container->getExtension($items[$i])) && false !== $extension->getXsdValidationBasePath()) { |
455 | - $path = str_replace($extension->getNamespace(), str_replace('\\', '/', $extension->getXsdValidationBasePath()).'/', $items[$i + 1]); |
|
455 | + $path = str_replace($extension->getNamespace(), str_replace('\\', '/', $extension->getXsdValidationBasePath()) . '/', $items[$i + 1]); |
|
456 | 456 | |
457 | 457 | if (!is_file($path)) { |
458 | 458 | throw new RuntimeException(sprintf('Extension "%s" references a non-existent XSD file "%s"', get_class($extension), $path)); |
@@ -475,10 +475,10 @@ discard block |
||
475 | 475 | $parts = explode('/', str_replace('\\', '/', $tmpfile)); |
476 | 476 | } |
477 | 477 | } |
478 | - $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : ''; |
|
479 | - $location = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts)); |
|
478 | + $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts) . '/' : ''; |
|
479 | + $location = 'file:///' . $drive . implode('/', array_map('rawurlencode', $parts)); |
|
480 | 480 | |
481 | - $imports .= sprintf(' <xsd:import namespace="%s" schemaLocation="%s" />'."\n", $namespace, $location); |
|
481 | + $imports .= sprintf(' <xsd:import namespace="%s" schemaLocation="%s" />' . "\n", $namespace, $location); |
|
482 | 482 | } |
483 | 483 | |
484 | 484 | $source = <<<EOF |
@@ -491,7 +491,7 @@ |
||
491 | 491 | <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/> |
492 | 492 | $imports |
493 | 493 | </xsd:schema> |
494 | -EOF |
|
494 | +eof |
|
495 | 495 | ; |
496 | 496 | |
497 | 497 | $valid = @$dom->schemaValidateSource($source); |
@@ -16,8 +16,8 @@ |
||
16 | 16 | use Behat\Testwork\ServiceContainer\Extension; |
17 | 17 | use Behat\Testwork\ServiceContainer\ExtensionManager; |
18 | 18 | use Sylius\Behat\Extension\MultiContainerExtension\ContainerConfiguration; |
19 | -use Sylius\Behat\Extension\MultiContainerExtension\Context\Environment\Handler\ContextServiceEnvironmentHandler; |
|
20 | 19 | use Sylius\Behat\Extension\MultiContainerExtension\ContextRegistry; |
20 | +use Sylius\Behat\Extension\MultiContainerExtension\Context\Environment\Handler\ContextServiceEnvironmentHandler; |
|
21 | 21 | use Sylius\Behat\Extension\MultiContainerExtension\Loader\XmlFileLoader; |
22 | 22 | use Sylius\Behat\Extension\MultiContainerExtension\ScopeManipulator; |
23 | 23 | use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator; |
@@ -18,7 +18,14 @@ discard block |
||
18 | 18 | */ |
19 | 19 | interface UpdatePageInterface extends BaseUpdatePageInterface |
20 | 20 | { |
21 | + /** |
|
22 | + * @return void |
|
23 | + */ |
|
21 | 24 | public function enable(); |
25 | + |
|
26 | + /** |
|
27 | + * @return void |
|
28 | + */ |
|
22 | 29 | public function disable(); |
23 | 30 | |
24 | 31 | /** |
@@ -44,28 +51,36 @@ discard block |
||
44 | 51 | * @param string $name |
45 | 52 | * @param string $code |
46 | 53 | * @param string|null $abbreviation |
54 | + * @return void |
|
47 | 55 | */ |
48 | 56 | public function addProvince($name, $code, $abbreviation = null); |
49 | 57 | |
50 | 58 | /** |
51 | 59 | * @param string $provinceName |
60 | + * @return void |
|
52 | 61 | */ |
53 | 62 | public function removeProvince($provinceName); |
54 | 63 | |
64 | + /** |
|
65 | + * @return void |
|
66 | + */ |
|
55 | 67 | public function clickAddProvinceButton(); |
56 | 68 | |
57 | 69 | /** |
58 | 70 | * @param string $provinceName |
71 | + * @return void |
|
59 | 72 | */ |
60 | 73 | public function nameProvince($provinceName); |
61 | 74 | |
62 | 75 | /** |
63 | 76 | * @param string $provinceName |
77 | + * @return void |
|
64 | 78 | */ |
65 | 79 | public function removeProvinceName($provinceName); |
66 | 80 | |
67 | 81 | /** |
68 | 82 | * @param string $provinceCode |
83 | + * @return void |
|
69 | 84 | */ |
70 | 85 | public function specifyProvinceCode($provinceCode); |
71 | 86 | } |
@@ -18,11 +18,19 @@ |
||
18 | 18 | */ |
19 | 19 | interface UpdatePageInterface extends BaseUpdatePageInterface |
20 | 20 | { |
21 | + /** |
|
22 | + * @return void |
|
23 | + */ |
|
21 | 24 | public function enable(); |
25 | + |
|
26 | + /** |
|
27 | + * @return void |
|
28 | + */ |
|
22 | 29 | public function disable(); |
23 | 30 | |
24 | 31 | /** |
25 | 32 | * @param string $exchangeRate |
33 | + * @return void |
|
26 | 34 | */ |
27 | 35 | public function changeExchangeRate($exchangeRate); |
28 | 36 |