ErrorEntry::constraint()   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 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
}