Error::getPath()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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