Completed
Push — master ( 391d5f...dcdeac )
by Arman
19s queued 16s
created

LoggerException::unsupportedAdapter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 * Quantum PHP Framework
4
 *
5
 * An open source software development framework for PHP
6
 *
7
 * @package Quantum
8
 * @author Arman Ag. <[email protected]>
9
 * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org)
10
 * @link http://quantum.softberg.org/
11
 * @since 2.9.5
12
 */
13
14
namespace Quantum\Logger;
15
16
use Exception;
17
18
/**
19
 * Class LoggerException
20
 * @package Quantum\Logger
21
 */
22
class LoggerException extends Exception
23
{
24
    /**
25
     * @param string $name
26
     * @return LoggerException
27
     */
28
    public static function unsupportedAdapter(string $name): LoggerException
29
    {
30
        return new static(t('exception.not_supported_adapter', $name));
31
    }
32
33
    /**
34
     * @param string $name
35
     * @return LoggerException
36
     */
37
    public static function logPathIsNotDirectory(string $name): LoggerException
38
    {
39
        return new static(t('exception.log_path_is_not_directory', $name));
40
    }
41
42
    /**
43
     * @param string $name
44
     * @return LoggerException
45
     */
46
    public static function logPathIsNotFile(string $name): LoggerException
47
    {
48
        return new static(t('exception.log_path_is_not_file', $name));
49
    }
50
}