@@ -3,7 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use Symfony\Component\Yaml\Yaml; |
5 | 5 | use Ciandt\Behat\PlaceholdersExtension\Utils\PlaceholderUtils; |
6 | -use Ciandt\Behat\PlaceholdersExtension\PlaceholderContainer\PlaceholderContainer; |
|
7 | 6 | use Ciandt\Behat\PlaceholdersExtension\Exception\MissingSectionException; |
8 | 7 | use Ciandt\Behat\PlaceholdersExtension\Exception\UndefinedPlaceholderException; |
9 | 8 |
@@ -109,9 +109,9 @@ |
||
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
112 | - private function getSectionPlaceholders($configKey, $section){ |
|
112 | + private function getSectionPlaceholders($configKey, $section) { |
|
113 | 113 | $config = $this->getConfig($configKey); |
114 | - if (!key_exists($section, $config)){ |
|
114 | + if (!key_exists($section, $config)) { |
|
115 | 115 | throw new MissingSectionException( |
116 | 116 | $configKey, |
117 | 117 | $this->getFilePath($configKey), |
@@ -3,11 +3,9 @@ |
||
3 | 3 | |
4 | 4 | namespace Ciandt\Behat\PlaceholdersExtension\Transformation; |
5 | 5 | |
6 | -use Behat\Behat\Definition\Call\DefinitionCall; |
|
7 | 6 | use Behat\Gherkin\Node\TableNode; |
8 | 7 | use Behat\Testwork\Call\RuntimeCallee; |
9 | 8 | use Ciandt\Behat\PlaceholdersExtension\Config\PlaceholdersRepository; |
10 | -use Ciandt\Behat\PlaceholdersExtension\PlaceholderContainer\PlaceholderContainer; |
|
11 | 9 | use Ciandt\Behat\PlaceholdersExtension\PlaceholderContainer\PlaceholderContainerStepNode; |
12 | 10 | |
13 | 11 | /** |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $container->setDefinition(self::PLACEHOLDERS_CONTROLLER_ID, $definition); |
99 | 99 | } |
100 | 100 | |
101 | - protected function initializePlaceholderUtils($variantTags,$configTags){ |
|
101 | + protected function initializePlaceholderUtils($variantTags, $configTags) { |
|
102 | 102 | PlaceholderUtils::setVariantTags($variantTags); |
103 | 103 | PlaceholderUtils::setConfigKeys(array_keys($configTags)); |
104 | 104 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $container->setDefinition(self::STEPS_DECORATOR_ID, $definition); |
157 | 157 | } |
158 | 158 | |
159 | - protected function loadBeforeScenarioSubscriber(ContainerBuilder $container){ |
|
159 | + protected function loadBeforeScenarioSubscriber(ContainerBuilder $container) { |
|
160 | 160 | $definition = new Definition('Ciandt\Behat\PlaceholdersExtension\Subscriber\BeforeScenarioSubscriber'); |
161 | 161 | $definition->addTag(EventDispatcherExtension::SUBSCRIBER_TAG, array('priority' => 0)); |
162 | 162 | $container->setDefinition(self::BEFORE_SCENARIO_SUBSCRIBER_ID, $definition); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | ); |
32 | 32 | } |
33 | 33 | |
34 | - public function onBeforeScenarioTested($beforeScenario){ |
|
34 | + public function onBeforeScenarioTested($beforeScenario) { |
|
35 | 35 | $featureTags = $beforeScenario->getFeature()->getTags(); |
36 | 36 | $scenarioTags = $beforeScenario->getNode()->getTags(); |
37 | 37 | $this->scenarioTags = array_merge($featureTags, $scenarioTags); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $scenarios = array(); |
70 | 70 | |
71 | 71 | foreach ($feature->getScenarios() as $scenario) { |
72 | - $scenarios = array_merge($scenarios,$this->splitScenarioPerVariants($scenario,$feature)); |
|
72 | + $scenarios = array_merge($scenarios, $this->splitScenarioPerVariants($scenario, $feature)); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | return new FeatureNode( |
@@ -85,12 +85,12 @@ discard block |
||
85 | 85 | ); |
86 | 86 | } |
87 | 87 | |
88 | - private function splitScenarioPerVariants(ScenarioInterface $scenarioLike, FeatureNode $feature){ |
|
88 | + private function splitScenarioPerVariants(ScenarioInterface $scenarioLike, FeatureNode $feature) { |
|
89 | 89 | $scenarioTags = $scenarioLike->getTags(); |
90 | 90 | $featureTags = $feature->getTags(); |
91 | - $tags = array_merge($scenarioTags,$featureTags); |
|
91 | + $tags = array_merge($scenarioTags, $featureTags); |
|
92 | 92 | |
93 | - $variants = PlaceholderUtils::filterVariantTags($tags,false); |
|
93 | + $variants = PlaceholderUtils::filterVariantTags($tags, false); |
|
94 | 94 | |
95 | 95 | if (count($variants) <= 1) { |
96 | 96 | return array($scenarioLike); |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | private function forkScenario(ScenarioInterface $scenarioLike, $variants) |
104 | 104 | { |
105 | 105 | $scenarios = array(); |
106 | - $nonVariantTags = PlaceholderUtils::filterVariantTags($scenarioLike->getTags(),true); |
|
106 | + $nonVariantTags = PlaceholderUtils::filterVariantTags($scenarioLike->getTags(), true); |
|
107 | 107 | foreach ($variants as $variant) { |
108 | 108 | $tags = array_merge($nonVariantTags, array($variant)); |
109 | - if ($scenarioLike instanceof ScenarioNode){ |
|
109 | + if ($scenarioLike instanceof ScenarioNode) { |
|
110 | 110 | $scenarios[] = new ScenarioNode( |
111 | 111 | $scenarioLike->getTitle(), |
112 | 112 | $tags, |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $scenarioLike->getKeyword(), |
115 | 115 | $scenarioLike->getLine() |
116 | 116 | ); |
117 | - } elseif ($scenarioLike instanceof OutlineNode){ |
|
117 | + } elseif ($scenarioLike instanceof OutlineNode) { |
|
118 | 118 | $scenarios[] = new OutlineNode( |
119 | 119 | $scenarioLike->getTitle(), |
120 | 120 | $tags, |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public function transformArgument(DefinitionCall $definitionCall, $argumentIndex, $argumentValue) { |
33 | 33 | $tags = $this->beforeScenarioSubscriber->getScenarioTags(); |
34 | 34 | $transformedArgument = $argumentValue; |
35 | - if (RuntimePlaceholdersTransformation::supportsDefinitionAndArgument($tags, $argumentValue)){ |
|
35 | + if (RuntimePlaceholdersTransformation::supportsDefinitionAndArgument($tags, $argumentValue)) { |
|
36 | 36 | $transformedArgument = RuntimePlaceholdersTransformation::transformArgument( |
37 | 37 | $transformedArgument, |
38 | 38 | $this->placeholdersRepository, |