Completed
Pull Request — master (#82)
by Michal
01:28
created

AbstractOutput   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 22
ccs 4
cts 8
cp 0.5
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getCode() 0 4 1
A getDescription() 0 4 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