Completed
Push — master ( f63aaf...b18312 )
by Alex
05:51
created

LoaderException::notFound()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 2
crap 1
1
<?php
2
3
namespace AlexMasterov\EquipTwig\Exception;
4
5
use AlexMasterov\EquipTwig\Exception\ExceptionInterface;
6
use Twig_Error_Loader;
7
8
class LoaderException extends Twig_Error_Loader implements ExceptionInterface
9
{
10
    /**
11
     * @param string $name  The template name
12
     * @param string $where The template directory path
13
     *
14
     * @return static
15
     */
16 2
    public static function notFound($name, $where)
17
    {
18 2
        return new static(sprintf(
19 2
            'Unable to find template `%s` (looked into: %s).',
20
            $name,
21
            $where
22
        ));
23
    }
24
}
25