| Conditions | 4 |
| Paths | 8 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function completeEntry(ActionDescriptor $action = null, $id, $currentSteps, $state) |
||
| 29 | { |
||
| 30 | $workflowManager = $this->getWorkflowManager(); |
||
| 31 | $workflowManager->getEngineManager()->getDataEngine()->validateIterateData($currentSteps); |
||
| 32 | |||
| 33 | $context = $workflowManager->getContext(); |
||
| 34 | |||
| 35 | $store = $workflowManager->getConfiguration()->getWorkflowStore(); |
||
| 36 | $store->setEntryState($id, $state); |
||
| 37 | |||
| 38 | $oldStatus = null !== $action ? $action->getUnconditionalResult()->getOldStatus() : 'Finished'; |
||
| 39 | $actionIdValue = null !== $action ? $action->getId() : -1; |
||
| 40 | foreach ($currentSteps as $step) { |
||
| 41 | $store->markFinished($step, $actionIdValue, new DateTime(), $oldStatus, $context->getCaller()); |
||
| 42 | $store->moveToHistory($step); |
||
| 43 | } |
||
| 44 | } |
||
| 45 | } |
||
| 46 |