@@ -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,52 +18,67 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | interface CreatePageInterface extends BaseCreatePageInterface |
| 20 | 20 | { |
| 21 | + /** |
|
| 22 | + * @return void |
|
| 23 | + */ |
|
| 21 | 24 | public function enable(); |
| 22 | 25 | |
| 26 | + /** |
|
| 27 | + * @return void |
|
| 28 | + */ |
|
| 23 | 29 | public function disable(); |
| 24 | 30 | |
| 25 | 31 | /** |
| 26 | 32 | * @param string $name |
| 33 | + * @return void |
|
| 27 | 34 | */ |
| 28 | 35 | public function nameIt($name); |
| 29 | 36 | |
| 30 | 37 | /** |
| 31 | 38 | * @param string $code |
| 39 | + * @return void |
|
| 32 | 40 | */ |
| 33 | 41 | public function specifyCode($code); |
| 34 | 42 | |
| 35 | 43 | /** |
| 36 | 44 | * @param string $description |
| 45 | + * @return void |
|
| 37 | 46 | */ |
| 38 | 47 | public function describeItAs($description); |
| 39 | 48 | |
| 40 | 49 | /** |
| 41 | 50 | * @param string $hostname |
| 51 | + * @return void |
|
| 42 | 52 | */ |
| 43 | 53 | public function setHostname($hostname); |
| 44 | 54 | |
| 45 | 55 | /** |
| 46 | 56 | * @param string $color |
| 57 | + * @return void |
|
| 47 | 58 | */ |
| 48 | 59 | public function defineColor($color); |
| 49 | 60 | |
| 50 | 61 | /** |
| 51 | 62 | * @param string $language |
| 63 | + * @return void |
|
| 52 | 64 | */ |
| 53 | 65 | public function chooseLocale($language); |
| 54 | 66 | |
| 55 | 67 | /** |
| 56 | 68 | * @param string $currencyCode |
| 69 | + * @return void |
|
| 57 | 70 | */ |
| 58 | 71 | public function chooseCurrency($currencyCode); |
| 59 | 72 | |
| 60 | 73 | /** |
| 61 | 74 | * @param string $shippingMethod |
| 75 | + * @return void |
|
| 62 | 76 | */ |
| 63 | 77 | public function chooseShippingMethod($shippingMethod); |
| 64 | 78 | |
| 65 | 79 | /** |
| 66 | 80 | * @param string $paymentMethod |
| 81 | + * @return void |
|
| 67 | 82 | */ |
| 68 | 83 | public function choosePaymentMethod($paymentMethod); |
| 69 | 84 | } |
@@ -19,17 +19,25 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | interface UpdatePageInterface extends BaseUpdatePageInterface |
| 21 | 21 | { |
| 22 | + /** |
|
| 23 | + * @return void |
|
| 24 | + */ |
|
| 22 | 25 | public function enable(); |
| 23 | 26 | |
| 27 | + /** |
|
| 28 | + * @return void |
|
| 29 | + */ |
|
| 24 | 30 | public function disable(); |
| 25 | 31 | |
| 26 | 32 | /** |
| 27 | 33 | * @param string $themeName |
| 34 | + * @return void |
|
| 28 | 35 | */ |
| 29 | 36 | public function setTheme($themeName); |
| 30 | 37 | |
| 31 | 38 | /** |
| 32 | 39 | * @throws ElementNotFoundException |
| 40 | + * @return void |
|
| 33 | 41 | */ |
| 34 | 42 | public function unsetTheme(); |
| 35 | 43 | |
@@ -40,6 +48,7 @@ discard block |
||
| 40 | 48 | |
| 41 | 49 | /** |
| 42 | 50 | * @param string $language |
| 51 | + * @return void |
|
| 43 | 52 | */ |
| 44 | 53 | public function chooseLocale($language); |
| 45 | 54 | |
@@ -52,6 +61,7 @@ discard block |
||
| 52 | 61 | |
| 53 | 62 | /** |
| 54 | 63 | * @param string $currencyCode |
| 64 | + * @return void |
|
| 55 | 65 | */ |
| 56 | 66 | public function chooseCurrency($currencyCode); |
| 57 | 67 | |
@@ -64,6 +74,7 @@ discard block |
||
| 64 | 74 | |
| 65 | 75 | /** |
| 66 | 76 | * @param string $shippingMethod |
| 77 | + * @return void |
|
| 67 | 78 | */ |
| 68 | 79 | public function chooseShippingMethod($shippingMethod); |
| 69 | 80 | |
@@ -76,6 +87,7 @@ discard block |
||
| 76 | 87 | |
| 77 | 88 | /** |
| 78 | 89 | * @param string $paymentMethod |
| 90 | + * @return void |
|
| 79 | 91 | */ |
| 80 | 92 | public function choosePaymentMethod($paymentMethod); |
| 81 | 93 | |
@@ -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 | |
@@ -20,33 +20,42 @@ |
||
| 20 | 20 | { |
| 21 | 21 | /** |
| 22 | 22 | * @param string $name |
| 23 | + * @return void |
|
| 23 | 24 | */ |
| 24 | 25 | public function specifyFirstName($name); |
| 25 | 26 | |
| 26 | 27 | /** |
| 27 | 28 | * @param string $name |
| 29 | + * @return void |
|
| 28 | 30 | */ |
| 29 | 31 | public function specifyLastName($name); |
| 30 | 32 | |
| 31 | 33 | /** |
| 32 | 34 | * @param string $email |
| 35 | + * @return void |
|
| 33 | 36 | */ |
| 34 | 37 | public function specifyEmail($email); |
| 35 | 38 | |
| 36 | 39 | /** |
| 37 | 40 | * @param string $birthday |
| 41 | + * @return void |
|
| 38 | 42 | */ |
| 39 | 43 | public function specifyBirthday($birthday); |
| 40 | 44 | |
| 41 | 45 | /** |
| 42 | 46 | * @param string $password |
| 47 | + * @return void |
|
| 43 | 48 | */ |
| 44 | 49 | public function specifyPassword($password); |
| 45 | 50 | |
| 46 | 51 | /** |
| 47 | 52 | * @param string $gender |
| 53 | + * @return void |
|
| 48 | 54 | */ |
| 49 | 55 | public function chooseGender($gender); |
| 50 | 56 | |
| 57 | + /** |
|
| 58 | + * @return void |
|
| 59 | + */ |
|
| 51 | 60 | public function selectCreateAccount(); |
| 52 | 61 | } |