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

CardId::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

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
nc 1
nop 0
crap 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
}