Completed
Push — master ( 5a4161...cd3cad )
by Vladimir
02:21
created

FileAwareException::getLineNumber()   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 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
/**
4
 * @copyright 2017 Vladimir Jimenez
5
 * @license   https://github.com/allejo/stakx/blob/master/LICENSE.md MIT
6
 */
7
8
namespace allejo\stakx\Exception;
9
10
/**
11
 * Exception thrown when an error is found in a file
12
 *
13
 * @package allejo\stakx\Exception
14
 */
15
class FileAwareException extends \RuntimeException
16
{
17
    private $lineNumber;
18
    private $filePath;
19
20 10
    public function __construct($message = "", $code = 0, \Exception $previous = null, $path = "", $line = -1)
21
    {
22 10
        parent::__construct($message, $code, $previous);
23
24 10
        $this->filePath = $path;
25 10
        $this->lineNumber = $line;
26 10
    }
27
28
    public function getLineNumber ()
29
    {
30
        return $this->lineNumber;
31
    }
32
33
    public function getPath ()
34
    {
35
        return $this->filePath;
36
    }
37
}