ViewException::noComponentClass()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 1
cp 0
crap 2
rs 10
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 invalidComponentMethod(string $class, string $method)
17
    {
18
        return new static(lang('View.invalidComponentMethod', ['class' => $class, 'method' => $method]));
19
    }
20
21
    public static function missingComponentParameters(string $class, string $method)
22
    {
23
        return new static(lang('View.missingComponentParameters', ['class' => $class, 'method' => $method]));
24
    }
25
26
    public static function invalidComponentParameter(string $key)
27
    {
28
        return new static(lang('View.invalidComponentParameter', [$key]));
29
    }
30
31
    public static function noComponentClass()
32
    {
33
        return new static(lang('View.noComponentClass'));
34
    }
35
36
    public static function invalidComponentClass(?string $class = null)
37
    {
38
        return new static(lang('View.invalidComponentClass', [$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