Passed
Pull Request — main (#8)
by
unknown
15:18
created

ConfigException::viewAdapterConfigNotFound()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 1
cts 1
cp 1
crap 1
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
/**
15
 * Exception pour la journalisation automatique.
16
 */
17
class ConfigException extends CriticalError
18
{
19
    use DebugTraceableTrait;
20
21
    /**
22
     * code d'erreur
23
     *
24
     * @var int
25
     */
26
    protected $code = 3;
27
28
    public static function disabledMigrations()
29
    {
30
        return new static(lang('Migrations.disabled'));
31
    }
32
33
    public static function configDontExist(string $config, string $file)
34
    {
35
        return new static(lang('Config.fileDoesNotExist', [$config, $file]));
36
    }
37
38
    public static function fileDontExist(string $config)
39
    {
40
        return new static(lang('Config.configFileDoesNotExist', [$config]));
41
    }
42
43
    public static function notFound(string $key)
44
    {
45 2
        return new static(lang('Config.notFound', [$key]));
46
    }
47
48
    public static function viewAdapterConfigNotFound(string $adapter)
49
    {
50 2
        return new static(lang('Config.viewAdapterConfigNotFound', [$adapter]));
51
    }
52
}
53