Completed
Push — master ( 59cf45...89a6d0 )
by Markus
02:34
created

BrowserRedirectHandler   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 12
ccs 0
cts 5
cp 0
rs 10
c 1
b 0
f 0
wmc 3
lcom 1
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A canHandle() 0 4 2
A handle() 0 4 1
1
<?php
2
3
namespace SSpkS\Handler;
4
5
class BrowserRedirectHandler extends AbstractHandler
6
{
7
    public function canHandle()
8
    {
9
        return (isset($this->config->site['redirectindex']) && !empty($this->config->site['redirectindex']));
10
    }
11
12
    public function handle()
13
    {
14
        header('Location: ' . $this->config->site['redirectindex']);
15
    }
16
}
17