Completed
Push — master ( 4717f5...89329a )
by Tony Karavasilev (Тони
19:40
created

AuthenticationFailureException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 25
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFrameworkErrorCode() 0 3 1
1
<?php
2
3
/**
4
 * The framework exception for marking authentication logical errors.
5
 */
6
7
namespace CryptoManana\Exceptions;
8
9
use \CryptoManana\Core\Abstractions\ErrorHandling\AbstractAuthenticationException as FrameworkAuthenticationException;
10
use \CryptoManana\Core\Abstractions\ErrorHandling\AbstractException as FrameworkException;
11
12
/**
13
 * Class AuthenticationFailureException - The framework exception for marking authentication errors.
14
 *
15
 * @package CryptoManana\Exceptions
16
 */
17
class AuthenticationFailureException extends FrameworkAuthenticationException
18
{
19
    /**
20
     * The framework internal error code.
21
     */
22
    const INTERNAL_CODE = 10;
23
24
    /**
25
     * The error code property storage.
26
     *
27
     * @see FrameworkException::$code The default error code.
28
     *
29
     * @var int The exception's error code.
30
     */
31
    protected $code = self::INTERNAL_CODE;
32
33
    /**
34
     * Get the default framework error code for this exception instance.
35
     *
36
     * @return int The exception's error code.
37
     * @see FrameworkException::INTERNAL_CODE Default error code.
38
     */
39 2
    public function getFrameworkErrorCode()
40
    {
41 2
        return static::INTERNAL_CODE; // Correct static access
42
    }
43
}
44