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

Response::getSuccess()   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 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