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

User   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 26
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getId() 0 4 1
A getDisplayName() 0 4 1
A __toString() 0 4 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