Error   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A errors() 0 2 1
A __construct() 0 5 1
A code() 0 2 1
A message() 0 2 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
}