Completed
Push — master ( fbf566...079bfa )
by Michal
03:01 queued 01:16
created

AbstractOutput::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Tomaj\NetteApi\Output;
4
5
abstract class AbstractOutput implements OutputInterface
6
{
7
    protected $code;
8
9
    protected $description;
10
11 15
    public function __construct(int $code, string $description = '')
12
    {
13 15
        $this->code = $code;
14 15
        $this->description = $description;
15 15
    }
16
17
    public function getCode(): int
18
    {
19
        return $this->code;
20
    }
21
22
    public function getDescription(): string
23
    {
24
        return $this->description;
25
    }
26
}
27