FileNotFoundException   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
/**
3
 * @license MIT
4
 */
5
namespace Pivasic\Bundle\Template\Exception;
6
7
/**
8
 * Class FileNotFoundException
9
 * @package Pivasic\Bundle\Common\File\Exception
10
 */
11
class FileNotFoundException extends \RuntimeException
12
{
13
    /**
14
     * @param string $path The path to the file that was not found
15
     */
16
    public function __construct(string $path)
17
    {
18
        $path = explode('package', $path);
19
        $path = $path[1] ?? '';
20
        parent::__construct(sprintf('The file "%s" does not exist', $path));
21
    }
22
}
23