ErrorEntry   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
dl 0
loc 29
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A message() 0 2 1
A constraint() 0 2 1
A field() 0 2 1
A __construct() 0 6 1
A code() 0 2 1
1
<?php
2
namespace Phrest\API;
3
4
class ErrorEntry
5
{
6
    private $code;
7
    private $field;
8
    private $message;
9
    private $constraint;
10
11 3
    public function __construct(int $code, string $field, string $message, string $constraint)
12
    {
13 3
        $this->code = $code;
14 3
        $this->field = $field;
15 3
        $this->message = $message;
16 3
        $this->constraint = $constraint;
17 3
    }
18
19 2
    public function code() : int {
20 2
        return $this->code;
21
    }
22
23 1
    public function field() : string {
24 1
        return $this->field;
25
    }
26
27 2
    public function message() : string {
28 2
        return $this->message;
29
    }
30
31 1
    public function constraint() : string {
32 1
        return $this->constraint;
33
    }
34
}