Passed
Push — main ( ed3749...c0dba5 )
by Dimitri
03:31
created

ViewException   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 35
rs 10
c 0
b 0
f 0
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A invalidCellParameter() 0 3 1
A noCellClass() 0 3 1
A missingCellParameters() 0 3 1
A tagSyntaxError() 0 3 1
A invalidCellMethod() 0 3 1
A invalidCellClass() 0 3 1
A invalidDecorator() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of Blitz PHP framework.
5
 *
6
 * (c) 2022 Dimitri Sitchet Tomkeu <[email protected]>
7
 *
8
 * For the full copyright and license information, please view
9
 * the LICENSE file that was distributed with this source code.
10
 */
11
12
namespace BlitzPHP\Exceptions;
13
14
class ViewException extends FrameworkException
15
{
16
    public static function invalidCellMethod(string $class, string $method)
17
    {
18
        return new static(lang('View.invalidCellMethod', ['class' => $class, 'method' => $method]));
19
    }
20
21
    public static function missingCellParameters(string $class, string $method)
22
    {
23
        return new static(lang('View.missingCellParameters', ['class' => $class, 'method' => $method]));
24
    }
25
26
    public static function invalidCellParameter(string $key)
27
    {
28
        return new static(lang('View.invalidCellParameter', [$key]));
29
    }
30
31
    public static function noCellClass()
32
    {
33
        return new static(lang('View.noCellClass'));
34
    }
35
36
    public static function invalidCellClass(?string $class = null)
37
    {
38
        return new static(lang('View.invalidCellClass', [$class]));
39
    }
40
41
    public static function tagSyntaxError(string $output)
42
    {
43
        return new static(lang('View.tagSyntaxError', [$output]));
44
    }
45
    
46
    public static function invalidDecorator(string $className)
47
    {
48
        return new static(lang('View.invalidDecoratorClass', [$className]));
49
    }
50
}
51