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.

Envelope   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 48
ccs 13
cts 13
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getMessage() 0 4 1
A getName() 0 4 1
A getClass() 0 4 1
A getTimestamp() 0 4 1
1
<?php
2
3
namespace Bernard;
4
5
/**
6
 * Wraps a Message with metadata that can be used for automatic retry
7
 * or inspection.
8
 */
9
final class Envelope
10
{
11
    private $message;
12
    private $class;
13
    private $timestamp;
14
15
    /**
16
     * @param Message $message
17
     */
18 54
    public function __construct(Message $message)
19
    {
20 54
        $this->message = $message;
21 54
        $this->class = get_class($message);
22 54
        $this->timestamp = time();
23 54
    }
24
25
    /**
26
     * @return Message
27
     */
28 14
    public function getMessage()
29
    {
30 14
        return $this->message;
31
    }
32
33
    /**
34
     * @return string
35
     */
36 20
    public function getName()
37
    {
38 20
        return $this->message->getName();
39
    }
40
41
    /**
42
     * @return string
43
     */
44 6
    public function getClass()
45
    {
46 6
        return $this->class;
47
    }
48
49
    /**
50
     * @return int
51
     */
52 3
    public function getTimestamp()
53
    {
54 3
        return $this->timestamp;
55
    }
56
}
57