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

ViewException::invalidCellParameter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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