Passed
Push — master ( cb9bd3...3f13ae )
by Henri
06:34
created

CheckTrait::check_importExist()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 14
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
c 0
b 0
f 0
dl 0
loc 14
rs 10
cc 2
nc 2
nop 1
1
<?php
2
3
namespace HnrAzevedo\Viewer;
4
5
use Exception;
6
7
trait CheckTrait{
8
9
    protected function check_viewExist(string $viewfile){
10
        if(!file_exists($this->path . $viewfile . '.view.php')){
11
            $v = $this->path . $viewfile;
12
            throw new Exception("Preview file {$v} not found");
13
        }
14
    }
15
16
}