GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — dev ( c7bcbf...fead3a )
by Андрей
06:13
created

Entry   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 9

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
c 2
b 0
f 0
lcom 0
cbo 9
dl 0
loc 29
ccs 0
cts 14
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A completeEntry() 0 17 4
1
<?php
2
/**
3
 * @link https://github.com/old-town/old-town-workflow
4
 * @author  Malofeykin Andrey  <[email protected]>
5
 */
6
namespace OldTown\Workflow\Engine;
7
8
use OldTown\Workflow\Loader\ActionDescriptor;
9
use Traversable;
10
use DateTime;
11
12
/**
13
 * Class Entry
14
 *
15
 * @package OldTown\Workflow\Engine
16
 */
17
class Entry extends AbstractEngine implements EntryInterface
18
{
19
    /**
20
     * @param ActionDescriptor $action
21
     * @param                  $id
22
     * @param array|Traversable $currentSteps
23
     * @param                  $state
24
     *
25
     * @return void
26
     *
27
     */
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