Error::errors()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 2
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
namespace Phrest\API;
3
4
class Error
5
{
6
    private $code;
7
    private $message;
8
    private $errors;
9
10 2
    public function __construct(int $code, string $message, \Phrest\API\ErrorEntry ...$errorEntries)
11
    {
12 2
        $this->code = $code;
13 2
        $this->message = $message;
14 2
        $this->errors = $errorEntries;
15 2
    }
16
17 2
    public function code() : int {
18 2
        return $this->code;
19
    }
20
21 2
    public function message() : string {
22 2
        return $this->message;
23
    }
24
25 2
    public function errors() : array {
26 2
        return $this->errors;
27
    }
28
}