Error   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 45.45%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 28
c 0
b 0
f 0
ccs 5
cts 11
cp 0.4545
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getMessage() 0 4 1
A getPath() 0 4 1
A getLine() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the PHP Translation package.
5
 *
6
 * (c) PHP Translation team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Translation\Extractor\Model;
13
14
/**
15
 * An error with the source code that occurred when extracting.
16
 *
17
 * @author Tobias Nyholm <[email protected]>
18
 */
19
final class Error
20
{
21
    private $message;
22
    private $path;
23
    private $line;
24
25 10
    public function __construct(string $message, string $path, int $line)
26
    {
27 10
        $this->message = $message;
28 10
        $this->path = (string) $path;
29 10
        $this->line = $line;
30 10
    }
31
32
    public function getMessage(): string
33
    {
34
        return $this->message;
35
    }
36
37
    public function getPath(): string
38
    {
39
        return $this->path;
40
    }
41
42
    public function getLine(): int
43
    {
44
        return $this->line;
45
    }
46
}
47