Passed
Pull Request — 6 (#1291)
by Arnaud
08:00 queued 11s
created

RuntimeException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
c 0
b 0
f 0
nc 1
nop 5
dl 0
loc 7
rs 10
1
<?php
2
/**
3
 * This file is part of the Cecil/Cecil package.
4
 *
5
 * Copyright (c) Arnaud Ligny <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Cecil\Exception;
12
13
class RuntimeException extends \RuntimeException implements ExceptionInterface
14
{
15
    private $pageFile;
16
    private $pageLine;
17
    private $pageCol;
18
19
    public function __construct(string $message, string $pageFile = null, int $pageLine = null, int $pageCol = null, \Throwable $previous = null)
20
    {
21
        $this->pageFile = $pageFile;
22
        $this->pageLine = $pageLine;
23
        $this->pageCol = $pageCol;
24
25
        parent::__construct($message, 0, $previous);
26
    }
27
28
    public function getPageFile()
29
    {
30
        return $this->pageFile;
31
    }
32
33
    public function getPageLine()
34
    {
35
        return $this->pageLine;
36
    }
37
38
    public function getPageCol()
39
    {
40
        return $this->pageCol;
41
    }
42
}
43