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

Ext   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A make() 0 8 1
A type() 0 4 1
A data() 0 4 1
A __construct() 0 3 1
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