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
03:41 queued 55s
created

Summary::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 4
crap 1
1
<?php
2
3
namespace Tgallice\FBMessenger\Model\Attachment\Template\Receipt;
4
5
class Summary implements \JsonSerializable
6
{
7
    /**
8
     * @var int|int
9
     */
10
    private $subtotal;
11
12
    /**
13
     * @var int[int
14
     */
15
    private $shippingCost;
16
17
    /**
18
     * @var int|int
19
     */
20
    private $totalTax;
21
22
    /**
23
     * @var int
24
     */
25
    private $totalCost;
26
27
    /**
28
     * @param int $totalCost
29
     * @param null|int $totalTax
30
     * @param null|int $subtotal
31
     * @param null|int $shippingCost
32
     */
33 6
    public function __construct($totalCost, $totalTax = null, $subtotal = null, $shippingCost = null)
34
    {
35 6
        $this->subtotal = $subtotal;
36 6
        $this->shippingCost = $shippingCost;
37 6
        $this->totalCost = $totalCost;
38 6
        $this->totalTax = $totalTax;
39 6
    }
40
41
    /**
42
     * @return int
43
     */
44 1
    public function getSubtotal()
45
    {
46 1
        return $this->subtotal;
47
    }
48
49
    /**
50
     * @return int
51
     */
52 1
    public function getShippingCost()
53
    {
54 1
        return $this->shippingCost;
55
    }
56
57
    /**
58
     * @return int
59
     */
60 1
    public function getTotalTax()
61
    {
62 1
        return $this->totalTax;
63
    }
64
65
    /**
66
     * @return int
67
     */
68 1
    public function getTotalCost()
69
    {
70 1
        return $this->totalCost;
71
    }
72
73
    /**
74
     * @return array
75
     */
76 1
    public function jsonSerialize()
77
    {
78
        return [
79 1
            'subtotal' => $this->subtotal,
80 1
            'shipping_cost' => $this->shippingCost,
81 1
            'total_tax' => $this->totalTax,
82 1
            'total_cost' => $this->totalCost,
83 1
        ];
84
    }
85
}
86