Passed
Push — master ( fab50a...a3bc03 )
by Tony Karavasilev (Тони
05:39 queued 03:41
created

BotDetectedException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 26
ccs 2
cts 2
cp 1
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 users that are detected as malicious bots.
5
 */
6
7
namespace CryptoManana\Exceptions;
8
9
use \CryptoManana\Core\Abstractions\ErrorHandling\AbstractException as FrameworkException;
10
11
/**
12
 * Class BotDetectedException - The framework exception for marking users as bots.
13
 *
14
 * @package CryptoManana\Exceptions
15
 */
16
class BotDetectedException extends FrameworkException
17
{
18
    /**
19
     * The framework internal error code.
20
     */
21
    const INTERNAL_CODE = 8;
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 1
    public function getFrameworkErrorCode()
40
    {
41 1
        return static::INTERNAL_CODE; // Correct static access
42
    }
43
}
44