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

FileAwareException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 55.56%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 23
ccs 5
cts 9
cp 0.5556
rs 10
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getLineNumber() 0 4 1
A getPath() 0 4 1
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
}