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
Pull Request — master (#9)
by Gallice
02:33
created

Adjustment   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 49
ccs 12
cts 12
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getName() 0 4 1
A getAmount() 0 4 1
A jsonSerialize() 0 7 1
1
<?php
2
3
namespace Tgallice\FBMessenger\Model\Attachment\Template\Receipt;
4
5
class Adjustment implements \JsonSerializable
6
{
7
    /**
8
     * @var null|string
9
     */
10
    private $name;
11
12
    /**
13
     * @var null|int
14
     */
15
    private $amount;
16
17
    /**
18
     * @param null|string $name
19
     * @param null|int $amount
20
     */
21 4
    public function __construct($name = null, $amount = null)
22
    {
23 4
        $this->name = $name;
24 4
        $this->amount = $amount;
25 4
    }
26
27
    /**
28
     * @return null|string
29
     */
30 1
    public function getName()
31
    {
32 1
        return $this->name;
33
    }
34
35
    /**
36
     * @return null|int
37
     */
38 1
    public function getAmount()
39
    {
40 1
        return $this->amount;
41
    }
42
43
    /**
44
     * @return array
45
     */
46 1
    public function jsonSerialize()
47
    {
48
        return [
49 1
            'name' => $this->name,
50 1
            'amount' => $this->amount,
51 1
        ];
52
    }
53
}
54