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

getFrameworkErrorCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * The framework exception for marking wrong algorithm/system configuration errors.
5
 */
6
7
namespace CryptoManana\Exceptions;
8
9
use \CryptoManana\Core\Abstractions\ErrorHandling\AbstractAlgorithmException as FrameworkAlgorithmException;
10
use \CryptoManana\Core\Abstractions\ErrorHandling\AbstractException as FrameworkException;
11
12
/**
13
 * Class WrongConfigurationException - The framework exception for marking wrong algorithm/system configuration errors.
14
 *
15
 * @package CryptoManana\Exceptions
16
 */
17
class WrongConfigurationException extends FrameworkAlgorithmException
18
{
19
    /**
20
     * The framework internal error code.
21
     */
22
    const INTERNAL_CODE = 14;
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