@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | * Переход между двумя статусами |
249 | 249 | * |
250 | 250 | * @param WorkflowEntryInterface $entry |
251 | - * @param SplObjectStorage|StepInterface[] $currentSteps |
|
251 | + * @param SplObjectStorage $currentSteps |
|
252 | 252 | * @param WorkflowStoreInterface $store |
253 | 253 | * @param WorkflowDescriptor $wf |
254 | 254 | * @param ActionDescriptor $action |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | |
498 | 498 | |
499 | 499 | /** |
500 | - * @param $id |
|
500 | + * @param integer $id |
|
501 | 501 | * @param TransientVarsInterface $inputs |
502 | 502 | * |
503 | 503 | * @return array |
@@ -874,7 +874,7 @@ discard block |
||
874 | 874 | |
875 | 875 | /** |
876 | 876 | * @param ActionDescriptor $action |
877 | - * @param $id |
|
877 | + * @param integer $id |
|
878 | 878 | * |
879 | 879 | * @return void |
880 | 880 | * |
@@ -1170,7 +1170,7 @@ discard block |
||
1170 | 1170 | * |
1171 | 1171 | * @param WorkflowDescriptor $wfDesc |
1172 | 1172 | * @param integer $actionId |
1173 | - * @param StepInterface[]|SplObjectStorage $currentSteps |
|
1173 | + * @param SplObjectStorage $currentSteps |
|
1174 | 1174 | * @param TransientVarsInterface $transientVars |
1175 | 1175 | * @param PropertySetInterface $ps |
1176 | 1176 | * |
@@ -1931,7 +1931,6 @@ |
||
1931 | 1931 | * @throws \OldTown\Workflow\Exception\WorkflowException |
1932 | 1932 | * @throws \OldTown\Workflow\Exception\StoreException |
1933 | 1933 | * @throws \OldTown\Workflow\Exception\InternalWorkflowException |
1934 | - |
|
1935 | 1934 | */ |
1936 | 1935 | public function query(WorkflowExpressionQuery $query) |
1937 | 1936 | { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | public function initialize($workflowName, $initialAction, TransientVarsInterface $inputs = null) |
120 | 120 | { |
121 | 121 | try { |
122 | - $initialAction = (integer)$initialAction; |
|
122 | + $initialAction = (integer) $initialAction; |
|
123 | 123 | |
124 | 124 | $wf = $this->getConfiguration()->getWorkflow($workflowName); |
125 | 125 | |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | $theResult = null; |
298 | 298 | |
299 | 299 | |
300 | - $currentStepId = null !== $step ? $step->getStepId() : -1; |
|
300 | + $currentStepId = null !== $step ? $step->getStepId() : -1; |
|
301 | 301 | foreach ($conditionalResults as $conditionalResult) { |
302 | 302 | if ($this->passesConditionsWithType(null, $conditionalResult->getConditions(), $transientVars, $ps, $currentStepId)) { |
303 | 303 | $theResult = $conditionalResult; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | } |
316 | 316 | |
317 | 317 | |
318 | - if (null === $theResult) { |
|
318 | + if (null === $theResult) { |
|
319 | 319 | $theResult = $action->getUnconditionalResult(); |
320 | 320 | $this->verifyInputs($entry, $theResult->getValidators(), $transientVars, $ps); |
321 | 321 | $extraPreFunctions = $theResult->getPreFunctions(); |
@@ -696,15 +696,15 @@ discard block |
||
696 | 696 | |
697 | 697 | if (null !== $owner) { |
698 | 698 | $o = $variableResolver->translateVariables($owner, $transientVars, $ps); |
699 | - $owner = null !== $o ? (string)$o : null; |
|
699 | + $owner = null !== $o ? (string) $o : null; |
|
700 | 700 | } |
701 | 701 | |
702 | 702 | |
703 | 703 | $oldStatus = $theResult->getOldStatus(); |
704 | - $oldStatus = (string)$variableResolver->translateVariables($oldStatus, $transientVars, $ps); |
|
704 | + $oldStatus = (string) $variableResolver->translateVariables($oldStatus, $transientVars, $ps); |
|
705 | 705 | |
706 | 706 | $status = $theResult->getStatus(); |
707 | - $status = (string)$variableResolver->translateVariables($status, $transientVars, $ps); |
|
707 | + $status = (string) $variableResolver->translateVariables($status, $transientVars, $ps); |
|
708 | 708 | |
709 | 709 | |
710 | 710 | if (null !== $currentStep) { |
@@ -715,7 +715,7 @@ discard block |
||
715 | 715 | $startDate = new DateTime(); |
716 | 716 | $dueDate = null; |
717 | 717 | |
718 | - $theResultDueDate = (string)$theResult->getDueDate(); |
|
718 | + $theResultDueDate = (string) $theResult->getDueDate(); |
|
719 | 719 | $theResultDueDate = trim($theResultDueDate); |
720 | 720 | if (strlen($theResultDueDate) > 0) { |
721 | 721 | $dueDateObject = $variableResolver->translateVariables($theResultDueDate, $transientVars, $ps); |
@@ -733,15 +733,15 @@ discard block |
||
733 | 733 | } |
734 | 734 | |
735 | 735 | $newStep = $store->createCurrentStep($entry->getId(), $nextStep, $owner, $startDate, $dueDate, $status, $previousIds); |
736 | - $transientVars['createdStep'] = $newStep; |
|
736 | + $transientVars['createdStep'] = $newStep; |
|
737 | 737 | |
738 | 738 | if (null === $currentStep && 0 === count($previousIds)) { |
739 | 739 | $currentSteps = []; |
740 | 740 | $currentSteps[] = $newStep; |
741 | - $transientVars['currentSteps'] = $currentSteps; |
|
741 | + $transientVars['currentSteps'] = $currentSteps; |
|
742 | 742 | } |
743 | 743 | |
744 | - if (! $transientVars->offsetExists('descriptor')) { |
|
744 | + if (!$transientVars->offsetExists('descriptor')) { |
|
745 | 745 | $errMsg = 'Ошибка при получение дескриптора workflow из transientVars'; |
746 | 746 | throw new InternalWorkflowException($errMsg); |
747 | 747 | } |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | */ |
802 | 802 | public function doAction($id, $actionId, TransientVarsInterface $inputs = null) |
803 | 803 | { |
804 | - $actionId = (integer)$actionId; |
|
804 | + $actionId = (integer) $actionId; |
|
805 | 805 | if (null === $inputs) { |
806 | 806 | $inputs = $this->transientVarsFactory(); |
807 | 807 | } |
@@ -1242,7 +1242,7 @@ discard block |
||
1242 | 1242 | } |
1243 | 1243 | |
1244 | 1244 | |
1245 | - $result = (boolean)$result; |
|
1245 | + $result = (boolean) $result; |
|
1246 | 1246 | |
1247 | 1247 | return $result; |
1248 | 1248 | } |
@@ -1629,9 +1629,9 @@ discard block |
||
1629 | 1629 | return $l; |
1630 | 1630 | } |
1631 | 1631 | |
1632 | - $actions = $s->getActions(); |
|
1632 | + $actions = $s->getActions(); |
|
1633 | 1633 | |
1634 | - if (null === $actions || 0 === $actions->count()) { |
|
1634 | + if (null === $actions || 0 === $actions->count()) { |
|
1635 | 1635 | return $l; |
1636 | 1636 | } |
1637 | 1637 | |
@@ -1938,7 +1938,7 @@ discard block |
||
1938 | 1938 | */ |
1939 | 1939 | public function setDefaultTypeResolverClass($defaultTypeResolverClass) |
1940 | 1940 | { |
1941 | - $this->defaultTypeResolverClass = (string)$defaultTypeResolverClass; |
|
1941 | + $this->defaultTypeResolverClass = (string) $defaultTypeResolverClass; |
|
1942 | 1942 | |
1943 | 1943 | return $this; |
1944 | 1944 | } |
@@ -2042,7 +2042,7 @@ discard block |
||
2042 | 2042 | } |
2043 | 2043 | |
2044 | 2044 | if (-1 !== $currentStepId) { |
2045 | - $stepId = array_key_exists('stepId', $args) ? (integer)$args['stepId'] : null; |
|
2045 | + $stepId = array_key_exists('stepId', $args) ? (integer) $args['stepId'] : null; |
|
2046 | 2046 | |
2047 | 2047 | if (null !== $stepId && -1 === $stepId) { |
2048 | 2048 | $args['stepId'] = $currentStepId; |
@@ -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\Workflow\Exception\StoreException; |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | interface WorkflowStoreInterface |
20 | 20 | { |
21 | 21 | /** |
22 | - * Устанавливает состояние для текущего workflow |
|
23 | - * |
|
24 | - * @param integer $entryId id workflow |
|
25 | - * @param integer $state id состояния в которое переводится сущность workflow |
|
26 | - * @return void |
|
27 | - * @throws StoreException |
|
28 | - */ |
|
22 | + * Устанавливает состояние для текущего workflow |
|
23 | + * |
|
24 | + * @param integer $entryId id workflow |
|
25 | + * @param integer $state id состояния в которое переводится сущность workflow |
|
26 | + * @return void |
|
27 | + * @throws StoreException |
|
28 | + */ |
|
29 | 29 | public function setEntryState($entryId, $state); |
30 | 30 | |
31 | 31 | /** |
@@ -1,8 +1,8 @@ |
||
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\Memory; |
7 | 7 | |
8 | 8 | use OldTown\PropertySet\PropertySetInterface; |