ViewException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 10
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A noTemplateSet() 0 3 1
A noLayoutSet() 0 3 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace Phauthentic\Presentation\View\Exception;
5
6
use Psr\Container\ContainerInterface;
7
use RuntimeException;
8
9
/**
10
 * Helper Aware View
11
 *
12
 * Some MVC Frameworks implement "view helpers". Objects that can be accessed
13
 * in the view layer to fulfill some view specific tasks that aren't application
14
 * logic.
15
 *
16
 * This class is simple extension to the default view object that takes a
17
 * PSR compatible container object from which we retrieve helper objects
18
 * through php's magic __get().
19
 */
20
class ViewException extends RuntimeException
21
{
22
    public static function noLayoutSet()
23
    {
24
        return new self('No layout specified for view');
25
    }
26
27
    public static function noTemplateSet()
28
    {
29
        return new self('No template specified for view');
30
    }
31
}
32