Completed
Push — master ( 156169...fab50a )
by Tony Karavasilev (Тони
05:04
created

MaliciousPayloadException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 26
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

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