Protector_precommon_badip_message::execute()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
/**
4
 * Class protector_precommon_badip_message
5
 */
6
class Protector_precommon_badip_message extends ProtectorFilterAbstract
7
{
8
    public function execute()
9
    {
10
        echo _MD_PROTECTOR_YOUAREBADIP;
11
        $protector = Protector::getInstance();
12
        if ($protector->ip_matched_info) {
13
            printf(_MD_PROTECTOR_FMT_JAILINFO, date(_MD_PROTECTOR_FMT_JAILTIME, $protector->ip_matched_info));
14
        }
15
        exit;
0 ignored issues
show
Best Practice introduced by
Using exit here is not recommended.

In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.

Loading history...
16
    }
17
}
18