Passed
Push — master ( 7a5018...5ee49d )
by Alessandro
01:01 queued 10s
created

CardId   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 25
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A createFromId() 0 4 1
A getId() 0 4 1
1
<?php
2
3
4
namespace TrelloCycleTime\ValueObject;
5
6
7
class CardId
8
{
9
    /**
10
     * @var string
11
     */
12
    private $id;
13
14 6
    private function __construct(string $id)
15
    {
16 6
        $this->id = $id;
17 6
    }
18
19 6
    public static function createFromId(string $id) :CardId
20
    {
21 6
        return new self($id);
22
    }
23
24
    /**
25
     * @return string
26
     */
27 4
    public function getId(): string
28
    {
29 4
        return $this->id;
30
    }
31
}