MalformedFile::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace Koriit\PHPDeps\Tokenizer\Exceptions;
4
5
use Exception;
6
7
class MalformedFile extends Exception
8
{
9
    /**
10
     * @var string
11
     */
12
    private $filePath;
13
14
    public function __construct($filePath, $cause = null)
15
    {
16
        parent::__construct('Malformed file: ' . $filePath, 0, $cause);
17
18
        $this->filePath = $filePath;
19
    }
20
21
    /**
22
     * @return string
23
     */
24
    public function getFilePath()
25
    {
26
        return $this->filePath;
27
    }
28
}
29