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   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 52
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0
wmc 4
lcom 0
cbo 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getResult() 0 4 1
A getAction() 0 4 1
A getType() 0 4 1
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
}