Completed
Push — master ( b529c8...c95386 )
by Tobias
02:42
created

Error::getPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
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 occured when extracting.
16
 *
17
 * @author Tobias Nyholm <[email protected]>
18
 */
19
final class Error
20
{
21
    /**
22
     * @var string
23
     */
24
    private $message;
25
26
    /**
27
     * @var string
28
     */
29
    private $path;
30
31
    /**
32
     * @var int
33
     */
34
    private $line;
35
36
    /**
37
     * @param string $message
38
     * @param string $path
39
     * @param int    $line
40
     */
41 5
    public function __construct($message, $path, $line)
42
    {
43 5
        $this->message = $message;
44 5
        $this->path = (string) $path;
45 5
        $this->line = $line;
46 5
    }
47
48
    /**
49
     * @return string
50
     */
51
    public function getMessage()
52
    {
53
        return $this->message;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getPath()
60
    {
61
        return $this->path;
62
    }
63
64
    /**
65
     * @return int
66
     */
67
    public function getLine()
68
    {
69
        return $this->line;
70
    }
71
}
72