@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $event->expects(self::never())->method("setBlocked"); |
77 | 77 | |
78 | 78 | $guard->registerGuardExpression("eventName", "workflow", "expression"); |
79 | - $guard->guardTransition($event ,"eventName"); |
|
79 | + $guard->guardTransition($event, "eventName"); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $logger->expects($this->exactly($loggerInvocationCount))->method("debug"); |
114 | 114 | |
115 | 115 | $guard->registerGuardExpression("eventName", "workflow", $expression); |
116 | - $guard->guardTransition($event ,"eventName"); |
|
116 | + $guard->guardTransition($event, "eventName"); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | public function expressionProvider() |
@@ -65,14 +65,14 @@ discard block |
||
65 | 65 | $this->setRootDir($rootDir); |
66 | 66 | |
67 | 67 | $this->configDir = realpath($configDir); |
68 | - if (!is_dir($this->configDir . '/' . $testCase)) { |
|
68 | + if (!is_dir($this->configDir.'/'.$testCase)) { |
|
69 | 69 | throw new \InvalidArgumentException(sprintf('The test case "%s" does not exist.', $testCase)); |
70 | 70 | } |
71 | 71 | $this->testCase = $testCase; |
72 | 72 | |
73 | 73 | $fs = new Filesystem(); |
74 | 74 | if (!$fs->isAbsolutePath($rootConfig) && |
75 | - !file_exists($rootConfig = $this->configDir . '/' . $testCase . '/' . $rootConfig)) { |
|
75 | + !file_exists($rootConfig = $this->configDir.'/'.$testCase.'/'.$rootConfig)) { |
|
76 | 76 | throw new \InvalidArgumentException(sprintf('The root config "%s" does not exist.', $rootConfig)); |
77 | 77 | } |
78 | 78 | $this->rootConfig = $rootConfig; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | { |
128 | 128 | $bundles = array(); |
129 | 129 | $baseBundles = $this->getBaseBundles(); |
130 | - if (file_exists($filename = $this->configDir . '/' . $this->testCase . '/bundles.php')) { |
|
130 | + if (file_exists($filename = $this->configDir.'/'.$this->testCase.'/bundles.php')) { |
|
131 | 131 | $bundles = include $filename; |
132 | 132 | } |
133 | 133 | return array_merge($baseBundles, $bundles); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | |
51 | 51 | // load fixtures |
52 | 52 | $fixturesBundle = new ClientBundle(); |
53 | - $fixturesPath = $fixturesBundle->getPath() . '/DataFixtures/ORM'; |
|
53 | + $fixturesPath = $fixturesBundle->getPath().'/DataFixtures/ORM'; |
|
54 | 54 | $this->loadFixtures($this->client->getContainer(), $fixturesPath); |
55 | 55 | } |
56 | 56 | |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | "app_name" => "ScheduleCaseTest", |
68 | 68 | "test_case" => "ScheduleCase", |
69 | 69 | "root_config" => "config.yml", |
70 | - "config_dir" => __DIR__ . "/Configuration", |
|
71 | - "root_dir" => __DIR__ . "/Configuration/ScheduleCase", |
|
70 | + "config_dir" => __DIR__."/Configuration", |
|
71 | + "root_dir" => __DIR__."/Configuration/ScheduleCase", |
|
72 | 72 | "environment" => "test", |
73 | 73 | "debug" => false |
74 | 74 | ) |
@@ -36,7 +36,7 @@ |
||
36 | 36 | "app_name" => "EventTriggerWithGuardsCaseTest", |
37 | 37 | "test_case" => "EventTriggerWithGuardsCase", |
38 | 38 | "root_config" => "config.yml", |
39 | - "config_dir" => __DIR__ . "/Configuration", |
|
39 | + "config_dir" => __DIR__."/Configuration", |
|
40 | 40 | "environment" => "test", |
41 | 41 | "debug" => false |
42 | 42 | ) |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | /** |
26 | 26 | * Workflow registry definition id |
27 | 27 | */ |
28 | - const WORKFLOW_REGISTRY_ID= 'workflow.registry'; |
|
28 | + const WORKFLOW_REGISTRY_ID = 'workflow.registry'; |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Workflow id prefix used in main workflow bundle |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $workflowReference = $callArgs[0]; |
72 | 72 | $workflowSupportedClass = $callArgs[1]; |
73 | 73 | |
74 | - $workflowIdWithPrefix = (string) $workflowReference; |
|
74 | + $workflowIdWithPrefix = (string) $workflowReference; |
|
75 | 75 | if (substr($workflowIdWithPrefix, 0, strlen(self::WORKFLOW_ID_PREFIX)) != self::WORKFLOW_ID_PREFIX) { |
76 | 76 | throw new RuntimeException( |
77 | 77 | sprintf( |
@@ -32,7 +32,7 @@ |
||
32 | 32 | { |
33 | 33 | $configuration = $this->getConfiguration($config, $container); |
34 | 34 | $config = $this->processConfiguration($configuration, $config); |
35 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
35 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
36 | 36 | $loader->load('applier.xml'); |
37 | 37 | |
38 | 38 | $this->registerSubjectManipulatorConfiguration($loader, $container, $config['subject_manipulator']); |
@@ -66,11 +66,11 @@ |
||
66 | 66 | |
67 | 67 | $jobToSchedule = new Job(ExecuteActionCommand::COMMAND_NAME, |
68 | 68 | [ |
69 | - '--action=' . $scheduledAction->getName(), |
|
70 | - '--arguments=' . json_encode($scheduledAction->getArguments()), |
|
71 | - '--workflow=' . $workflowContext->getWorkflow()->getName(), |
|
72 | - '--subjectClass=' . get_class($workflowContext->getSubject()), |
|
73 | - '--subjectId=' . $workflowContext->getSubjectId(), |
|
69 | + '--action='.$scheduledAction->getName(), |
|
70 | + '--arguments='.json_encode($scheduledAction->getArguments()), |
|
71 | + '--workflow='.$workflowContext->getWorkflow()->getName(), |
|
72 | + '--subjectClass='.get_class($workflowContext->getSubject()), |
|
73 | + '--subjectId='.$workflowContext->getSubjectId(), |
|
74 | 74 | ] |
75 | 75 | ); |
76 | 76 |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | ->end() |
95 | 95 | ->validate() |
96 | 96 | ->always() |
97 | - ->then(function ($v) { |
|
97 | + ->then(function($v) { |
|
98 | 98 | foreach ($v as $actionName => $actionConfig) { |
99 | 99 | if (!preg_match('/^[a-z0-9_]+$/i', $actionName)) { |
100 | 100 | throw new InvalidConfigurationException( |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | ->defaultValue([]) |
193 | 193 | ->beforeNormalization() |
194 | 194 | ->ifString() |
195 | - ->then(function ($v) { return array($v); }) |
|
195 | + ->then(function($v) { return array($v); }) |
|
196 | 196 | ->end() |
197 | 197 | ->useAttributeAsKey('name') |
198 | 198 | ->prototype('array') |
@@ -202,16 +202,16 @@ discard block |
||
202 | 202 | ->end() |
203 | 203 | ->beforeNormalization() |
204 | 204 | ->ifString() |
205 | - ->then(function ($v) { |
|
205 | + ->then(function($v) { |
|
206 | 206 | return ['arguments' => [$v]]; |
207 | 207 | }) |
208 | 208 | ->end() |
209 | 209 | ->beforeNormalization() |
210 | - ->ifTrue(function ($v) { |
|
210 | + ->ifTrue(function($v) { |
|
211 | 211 | // place arguments under 'arguments' key in order to validate it in common way |
212 | 212 | return is_array($v) && !(count($v) == 1 && array_key_exists('arguments', $v)); |
213 | 213 | }) |
214 | - ->then(function ($v) { |
|
214 | + ->then(function($v) { |
|
215 | 215 | return ['arguments' => $v]; |
216 | 216 | }) |
217 | 217 | ->end() |
@@ -290,10 +290,10 @@ discard block |
||
290 | 290 | ->end() |
291 | 291 | ->end() |
292 | 292 | ->beforeNormalization() |
293 | - ->ifTrue(function ($v) { |
|
293 | + ->ifTrue(function($v) { |
|
294 | 294 | return is_scalar($v) || is_array($v) && !ArrayUtils::isArrayAssoc($v); |
295 | 295 | }) |
296 | - ->then(function ($v) { |
|
296 | + ->then(function($v) { |
|
297 | 297 | $type = is_scalar($v) ? ActionArgumentTypes::TYPE_SCALAR : ActionArgumentTypes::TYPE_ARRAY; |
298 | 298 | return [ |
299 | 299 | 'type' => $type, |
@@ -302,10 +302,10 @@ discard block |
||
302 | 302 | }) |
303 | 303 | ->end() |
304 | 304 | ->validate() |
305 | - ->ifTrue(function ($v) { |
|
305 | + ->ifTrue(function($v) { |
|
306 | 306 | return is_array($v) && $v['type'] == ActionArgumentTypes::TYPE_ARRAY; |
307 | 307 | }) |
308 | - ->then(function ($v) { |
|
308 | + ->then(function($v) { |
|
309 | 309 | // recursive processing of array values |
310 | 310 | $treeBuilder = new TreeBuilder(); |
311 | 311 | $node = $treeBuilder->root('value'); |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | ->end() |
320 | 320 | ->end() |
321 | 321 | ->validate() |
322 | - ->ifTrue(function ($v) { |
|
322 | + ->ifTrue(function($v) { |
|
323 | 323 | return ArrayUtils::isArrayAssoc($v, false); |
324 | 324 | }) |
325 | 325 | // To provide cross-platform arguments handling we are not supporting here assoc arrays |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | 'See https://en.wikipedia.org/wiki/ISO_8601#Durations for format description') |
367 | 367 | ->validate() |
368 | 368 | ->always() |
369 | - ->then(function ($v) { |
|
369 | + ->then(function($v) { |
|
370 | 370 | try { |
371 | 371 | new DateInterval($v); |
372 | 372 | |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | ->prototype('array') |
408 | 408 | ->beforeNormalization() |
409 | 409 | ->ifString() |
410 | - ->then(function ($v) { return ['expression' => $v]; }) |
|
410 | + ->then(function($v) { return ['expression' => $v]; }) |
|
411 | 411 | ->end() |
412 | 412 | ->children() |
413 | 413 | ->scalarNode('expression') |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | ->beforeNormalization() |
439 | 439 | ->always() |
440 | 440 | ->then( |
441 | - function ($v) { |
|
441 | + function($v) { |
|
442 | 442 | if (isset($v) && is_array($v)) { |
443 | 443 | foreach ($v as $key => $value) { |
444 | 444 | unset($v[$key]); |
@@ -81,7 +81,7 @@ |
||
81 | 81 | |
82 | 82 | foreach ($actions as $scheduledAction) { |
83 | 83 | $this->executeSafely( |
84 | - function () use ($workflowContext, $scheduledAction) { |
|
84 | + function() use ($workflowContext, $scheduledAction) { |
|
85 | 85 | $this->actionScheduler->scheduleAction($workflowContext, $scheduledAction); |
86 | 86 | }, |
87 | 87 | $eventName, |