Completed
Branch master (7f0c44)
by Artem
02:24
created

Response   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 29
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getSuccess() 0 3 1
A getMessage() 0 3 1
A getType() 0 3 1
A __construct() 0 5 1
1
<?php declare(strict_types=1);
2
3
namespace Gockets\Model;
4
5
final class Response
6
{
7
    private $success;
8
9
    private $type;
10
11
    private $message;
12
13 6
    public function __construct(string $type, string $message)
14
    {
15 6
        $this->success = $type !== 'ERR';
16 6
        $this->type = $type;
17 6
        $this->message = $message;
18 6
    }
19
20
21 5
    public function getSuccess(): ?bool
22
    {
23 5
        return $this->success;
24
    }
25
26 5
    public function getType(): string
27
    {
28 5
        return $this->type;
29
    }
30
31 5
    public function getMessage(): string
32
    {
33 5
        return $this->message;
34
    }
35
}
36