Test Setup Failed
Push — master ( 68fc3d...8f864d )
by Alex
02:33
created

Ext::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace MessagePack;
5
6
final class Ext
7
{
8
    /** @var int */
9
    private $type;
10
11
    /** @var string */
12
    private $data;
13
14 9
    public static function make(int $type, string $data): self
15
    {
16 9
        $ext = new self();
17 9
        $ext->type = $type;
18 9
        $ext->data = $data;
19
20 9
        return $ext;
21
    }
22
23 9
    public function type(): int
24
    {
25 9
        return $this->type;
26
    }
27
28 9
    public function data(): string
29
    {
30 9
        return $this->data;
31
    }
32
33 9
    private function __construct()
34
    {
35 9
    }
36
}
37