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

FileAwareException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 5
dl 0
loc 7
ccs 5
cts 5
cp 1
crap 1
rs 9.4285
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
}