ValidationError   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 42
ccs 17
cts 17
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getCode() 0 4 1
A getErrorMessage() 0 4 1
A getHelpUrl() 0 4 1
A getLine() 0 4 1
A getCol() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace RicardoFiorani\Validator\Response\Error;
4
5
class ValidationError implements ValidationErrorInterface
6
{
7
    private $code;
8
    private $errorMessage;
9
    private $helpUrl;
10
    private $line;
11
    private $col;
12
13 2
    public function __construct(string $code, string $errorMessage, string $helpUrl, int $line, int $col)
14
    {
15 2
        $this->code = $code;
16 2
        $this->errorMessage = $errorMessage;
17 2
        $this->helpUrl = $helpUrl;
18 2
        $this->line = $line;
19 2
        $this->col = $col;
20 2
    }
21
22 1
    public function getCode(): string
23
    {
24 1
        return $this->code;
25
    }
26
27 1
    public function getErrorMessage(): string
28
    {
29 1
        return $this->errorMessage;
30
    }
31
32 1
    public function getHelpUrl(): string
33
    {
34 1
        return $this->helpUrl;
35
    }
36
37 1
    public function getLine(): int
38
    {
39 1
        return $this->line;
40
    }
41
42 1
    public function getCol(): int
43
    {
44 1
        return $this->col;
45
    }
46
}
47