Passed
Push — fallback-intl ( 2f4c17...1f6a03 )
by Arnaud
03:32
created

RuntimeException   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
c 0
b 0
f 0
dl 0
loc 28
rs 10
wmc 4

4 Methods

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