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.

OrderLine::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 4
1
<?php
2
3
namespace App;
4
5
class OrderLine
6
{
7
    /** @var int */
8
    private $id;
9
10
    /** @var string */
11
    private $description;
12
13
    /** @var int */
14
    private $unitPrice;
15
16
    /** @var int */
17
    private $quantity;
18
19
    public function __construct(int $id, string $description, int $unitPrice, int $quantity)
20
    {
21
        $this->id = $id;
22
        $this->description = $description;
23
        $this->unitPrice = $unitPrice;
24
        $this->quantity = $quantity;
25
    }
26
27
    public function id(): int
28
    {
29
        return $this->id;
30
    }
31
32
    public function description(): string
33
    {
34
        return $this->description;
35
    }
36
37
    public function unitPrice(): int
38
    {
39
        return $this->unitPrice;
40
    }
41
42
    public function quantity(): int
43
    {
44
        return $this->quantity;
45
    }
46
47
    public function totalPrice(): int
48
    {
49
        return $this->unitPrice * $this->quantity;
50
    }
51
}
52