UnsupportedException::getFrameworkErrorCode()   A
last analyzed

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
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
/**
4
 * The framework exception for marking unsupported algorithms and features.
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 UnsupportedException - The framework exception for marking unsupported algorithms.
14
 *
15
 * @package CryptoManana\Exceptions
16
 */
17
class UnsupportedException extends FrameworkAlgorithmException
18
{
19
    /**
20
     * The framework internal error code.
21
     */
22
    const INTERNAL_CODE = 3;
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 1
    public function getFrameworkErrorCode()
40
    {
41 1
        return static::INTERNAL_CODE; // Correct static access
42
    }
43
}
44