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.

Adjustment::jsonSerialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 7
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Tgallice\FBMessenger\Model\Attachment\Template\Receipt;
4
5 View Code Duplication
class Adjustment implements \JsonSerializable
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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