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.

Report::getAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
nc 1
nop 0
1
<?php
2
3
namespace Scheduler\Action;
4
5
/**
6
 * Class Report
7
 * @package Scheduler\Action
8
 * @author Aleh Hutnikau, <[email protected]>
9
 */
10
class Report
11
{
12
    /** @var ActionInterface executed task */
13
    private $action;
14
15
    /** @var mixed Execution result (task return value) */
16
    private $result;
17
18
    /** @var string 'success'|'error'*/
19
    private $type;
20
21
    const TYPE_SUCCESS = 'success';
22
    const TYPE_ERROR = 'error';
23
24
    /**
25
     * Report constructor.
26
     * @param ActionInterface $action
27
     * @param mixed $result - action execution result or thrown exception in case of error
28
     * @param string $type
29
     */
30 5
    public function __construct(ActionInterface $action, $result, $type = self::TYPE_SUCCESS)
31
    {
32 5
        $this->action = $action;
33 5
        $this->result = $result;
34 5
        $this->type = $type;
35 5
    }
36
37
    /**
38
     * Action execution result or thrown exception in case of error
39
     * @return mixed
40
     */
41 2
    public function getResult()
42
    {
43 2
        return $this->result;
44
    }
45
46
    /**
47
     * @return ActionInterface
48
     */
49 1
    public function getAction()
50
    {
51 1
        return $this->action;
52
    }
53
54
    /**
55
     * @return string
56
     */
57 1
    public function getType()
58
    {
59 1
        return $this->type;
60
    }
61
}