Passed
Pull Request — master (#182)
by Arman
06:43 queued 02:40
created

SessionException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A sessionNotStarted() 0 3 1
A sessionTableNotProvided() 0 3 1
A sessionNotDestroyed() 0 3 1
1
<?php
2
3
/**
4
 * Quantum PHP Framework
5
 *
6
 * An open source software development framework for PHP
7
 *
8
 * @package Quantum
9
 * @author Arman Ag. <[email protected]>
10
 * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org)
11
 * @link http://quantum.softberg.org/
12
 * @since 2.9.5
13
 */
14
15
namespace Quantum\Libraries\Session;
16
17
use Quantum\Exceptions\AppException;
18
19
/**
20
 * Class SessionException
21
 * @package Quantum\Libraries\Session
22
 */
23
class SessionException extends AppException
24
{
25
    /**
26
     * @return SessionException
27
     */
28
    public static function sessionNotStarted(): SessionException
29
    {
30
        return new static(t('exception.session_not_started'), E_WARNING);
31
    }
32
33
    /**
34
     * @return SessionException
35
     */
36
    public static function sessionNotDestroyed(): SessionException
37
    {
38
        return new static(t('exception.session_not_destroyed'), E_WARNING);
39
    }
40
41
    /**
42
     * @return SessionException
43
     */
44
    public static function sessionTableNotProvided(): SessionException
45
    {
46
        return new static(t('exception.session_table_not_provided'));
47
    }
48
}
49