Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
31 | 12 | public function test($ad_code) |
|
32 | { |
||
33 | 12 | $is_https = $this->request->server('HTTPS', false); |
|
34 | 12 | if ($is_https && preg_match('/http[^s]/', $ad_code)) |
|
35 | 12 | { |
|
36 | return array( |
||
37 | 'warning' => array( |
||
38 | 2 | 'UNSECURE_CONNECTION', |
|
39 | 2 | ), |
|
40 | 2 | ); |
|
41 | } |
||
42 | |||
43 | 10 | return array(); |
|
44 | } |
||
45 | } |
||
46 |