Completed
Pull Request — master (#6)
by Laurens
03:26
created

User::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\IzettleApi\API\Purchase;
6
7
final class User
8
{
9
    private $id;
10
    private $displayName;
11
12 4
    public function __construct(int $id, string $displayName)
13
    {
14 4
        $this->id = $id;
15 4
        $this->displayName = $displayName;
16 4
    }
17
18 1
    public function getId(): int
19
    {
20 1
        return $this->id;
21
    }
22
23 1
    public function getDisplayName(): string
24
    {
25 1
        return $this->displayName;
26
    }
27
28 1
    public function __toString(): string
29
    {
30 1
        return $this->getDisplayName();
31
    }
32
}
33