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

LoggerException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 27
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A logPathIsNotFile() 0 3 1
A unsupportedAdapter() 0 3 1
A logPathIsNotDirectory() 0 3 1
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
}