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

Summary   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 81
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 81
ccs 20
cts 20
cp 1
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getSubtotal() 0 4 1
A getShippingCost() 0 4 1
A getTotalTax() 0 4 1
A getTotalCost() 0 4 1
A jsonSerialize() 0 9 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