@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * @link https://github.com/old-town/old-town-workflow |
|
4 | - * @author Malofeykin Andrey <[email protected]> |
|
5 | - */ |
|
3 | + * @link https://github.com/old-town/old-town-workflow |
|
4 | + * @author Malofeykin Andrey <[email protected]> |
|
5 | + */ |
|
6 | 6 | namespace OldTown\Workflow\Spi; |
7 | 7 | |
8 | 8 | use OldTown\PropertySet\PropertySetInterface; |
@@ -18,12 +18,12 @@ discard block |
||
18 | 18 | interface WorkflowStoreInterface |
19 | 19 | { |
20 | 20 | /** |
21 | - * Устанавливает состояние для текущего workflow |
|
22 | - * |
|
23 | - * @param integer $entryId id workflow |
|
24 | - * @param integer $state id состояния в которое переводится сущность workflow |
|
25 | - * @return void |
|
26 | - */ |
|
21 | + * Устанавливает состояние для текущего workflow |
|
22 | + * |
|
23 | + * @param integer $entryId id workflow |
|
24 | + * @param integer $state id состояния в которое переводится сущность workflow |
|
25 | + * @return void |
|
26 | + */ |
|
27 | 27 | public function setEntryState($entryId, $state); |
28 | 28 | |
29 | 29 | /** |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | |
89 | 89 | |
90 | - $currentStepId = null !== $step ? $step->getStepId() : -1; |
|
90 | + $currentStepId = null !== $step ? $step->getStepId() : -1; |
|
91 | 91 | |
92 | 92 | |
93 | 93 | $conditionsEngine = $engineManager->getConditionsEngine(); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | |
114 | - if (null === $theResult) { |
|
114 | + if (null === $theResult) { |
|
115 | 115 | $theResult = $action->getUnconditionalResult(); |
116 | 116 | $this->verifyInputs($theResult->getValidators(), $transientVars, $ps); |
117 | 117 | $extraPreFunctions = $theResult->getPreFunctions(); |
@@ -345,15 +345,15 @@ discard block |
||
345 | 345 | |
346 | 346 | if (null !== $owner) { |
347 | 347 | $o = $variableResolver->translateVariables($owner, $transientVars, $ps); |
348 | - $owner = null !== $o ? (string)$o : null; |
|
348 | + $owner = null !== $o ? (string) $o : null; |
|
349 | 349 | } |
350 | 350 | |
351 | 351 | |
352 | 352 | $oldStatus = $theResult->getOldStatus(); |
353 | - $oldStatus = (string)$variableResolver->translateVariables($oldStatus, $transientVars, $ps); |
|
353 | + $oldStatus = (string) $variableResolver->translateVariables($oldStatus, $transientVars, $ps); |
|
354 | 354 | |
355 | 355 | $status = $theResult->getStatus(); |
356 | - $status = (string)$variableResolver->translateVariables($status, $transientVars, $ps); |
|
356 | + $status = (string) $variableResolver->translateVariables($status, $transientVars, $ps); |
|
357 | 357 | |
358 | 358 | |
359 | 359 | if (null !== $currentStep) { |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | $startDate = new DateTime(); |
365 | 365 | $dueDate = null; |
366 | 366 | |
367 | - $theResultDueDate = (string)$theResult->getDueDate(); |
|
367 | + $theResultDueDate = (string) $theResult->getDueDate(); |
|
368 | 368 | $theResultDueDate = trim($theResultDueDate); |
369 | 369 | if (strlen($theResultDueDate) > 0) { |
370 | 370 | $dueDateObject = $variableResolver->translateVariables($theResultDueDate, $transientVars, $ps); |
@@ -383,15 +383,15 @@ discard block |
||
383 | 383 | } |
384 | 384 | |
385 | 385 | $newStep = $store->createCurrentStep($entry->getId(), $nextStep, $owner, $startDate, $dueDate, $status, $previousIds); |
386 | - $transientVars['createdStep'] = $newStep; |
|
386 | + $transientVars['createdStep'] = $newStep; |
|
387 | 387 | |
388 | 388 | if (null === $currentStep && 0 === count($previousIds)) { |
389 | 389 | $currentSteps = []; |
390 | 390 | $currentSteps[] = $newStep; |
391 | - $transientVars['currentSteps'] = $currentSteps; |
|
391 | + $transientVars['currentSteps'] = $currentSteps; |
|
392 | 392 | } |
393 | 393 | |
394 | - if (! $transientVars->offsetExists('descriptor')) { |
|
394 | + if (!$transientVars->offsetExists('descriptor')) { |
|
395 | 395 | $errMsg = 'Ошибка при получение дескриптора workflow из transientVars'; |
396 | 396 | throw new InternalWorkflowException($errMsg); |
397 | 397 | } |
@@ -711,7 +711,7 @@ discard block |
||
711 | 711 | } |
712 | 712 | |
713 | 713 | |
714 | - $result = (boolean)$result; |
|
714 | + $result = (boolean) $result; |
|
715 | 715 | |
716 | 716 | return $result; |
717 | 717 | } |
@@ -127,7 +127,7 @@ |
||
127 | 127 | $args = $this->getWorkflowManager()->getEngineManager()->getArgsEngine()->prepareArgs($argsOriginal, $transientVars, $ps); |
128 | 128 | |
129 | 129 | if (-1 !== $currentStepId) { |
130 | - $stepId = array_key_exists('stepId', $args) ? (integer)$args['stepId'] : null; |
|
130 | + $stepId = array_key_exists('stepId', $args) ? (integer) $args['stepId'] : null; |
|
131 | 131 | |
132 | 132 | if (null !== $stepId && -1 === $stepId) { |
133 | 133 | $args['stepId'] = $currentStepId; |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | public function initialize($workflowName, $initialAction, TransientVarsInterface $inputs = null) |
200 | 200 | { |
201 | 201 | try { |
202 | - $initialAction = (integer)$initialAction; |
|
202 | + $initialAction = (integer) $initialAction; |
|
203 | 203 | |
204 | 204 | $wf = $this->getConfiguration()->getWorkflow($workflowName); |
205 | 205 | |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | |
303 | 303 | $currentSteps = $store->findCurrentSteps($id); |
304 | 304 | |
305 | - $engineManager = $this->getEngineManager(); |
|
305 | + $engineManager = $this->getEngineManager(); |
|
306 | 306 | $engineManager->getDataEngine()->populateTransientMap($entry, $transientVars, $wf->getRegisters(), 0, $currentSteps, $ps); |
307 | 307 | |
308 | 308 | $globalActions = $wf->getGlobalActions(); |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | */ |
374 | 374 | public function doAction($entryId, $actionId, TransientVarsInterface $inputs = null) |
375 | 375 | { |
376 | - $actionId = (integer)$actionId; |
|
376 | + $actionId = (integer) $actionId; |
|
377 | 377 | if (null === $inputs) { |
378 | 378 | $inputs = $this->transientVarsFactory(); |
379 | 379 | } |
@@ -916,9 +916,9 @@ discard block |
||
916 | 916 | return $l; |
917 | 917 | } |
918 | 918 | |
919 | - $actions = $s->getActions(); |
|
919 | + $actions = $s->getActions(); |
|
920 | 920 | |
921 | - if (null === $actions || 0 === $actions->count()) { |
|
921 | + if (null === $actions || 0 === $actions->count()) { |
|
922 | 922 | return $l; |
923 | 923 | } |
924 | 924 | |
@@ -1209,7 +1209,7 @@ discard block |
||
1209 | 1209 | */ |
1210 | 1210 | public function setDefaultTypeResolverClass($defaultTypeResolverClass) |
1211 | 1211 | { |
1212 | - $this->defaultTypeResolverClass = (string)$defaultTypeResolverClass; |
|
1212 | + $this->defaultTypeResolverClass = (string) $defaultTypeResolverClass; |
|
1213 | 1213 | |
1214 | 1214 | return $this; |
1215 | 1215 | } |