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::completeEntry()   A

Complexity

Conditions 4
Paths 8

Size

Total Lines 17
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 20

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 17
ccs 0
cts 14
cp 0
rs 9.2
cc 4
eloc 11
nc 8
nop 4
crap 20
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