HttpHeader   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A canHandle() 0 4 1
A handle() 0 5 1
1
<?php
2
namespace FMUP\ErrorHandler\Plugin;
3
4
use FMUP\Response\Header\Status;
5
6
class HttpHeader extends Abstraction
7
{
8 1
    public function canHandle()
9
    {
10 1
        return (!$this->getException() instanceof \FMUP\Exception\Status);
11
    }
12
13 1
    public function handle()
14
    {
15 1
        $this->getResponse()->setHeader(new Status(Status::VALUE_INTERNAL_SERVER_ERROR));
16 1
        return $this;
17
    }
18
}
19