Completed
Push — master ( 8ac024...c822e5 )
by Joao Gilberto
02:14
created

WhoopsHeaderTrait::setProperHeader()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 2 Features 1
Metric Value
c 4
b 2
f 1
dl 0
loc 7
rs 9.4285
cc 2
eloc 3
nc 2
nop 1
1
<?php
2
3
namespace ByJG\RestServer\Whoops;
4
5
use ByJG\RestServer\Exception\ClientShowException;
6
7
trait WhoopsHeaderTrait
8
{
9
    public function setProperHeader(\Exception $exception)
10
    {
11
        if ($exception instanceof ClientShowException)
12
        {
13
            $exception->handleHeader();
14
        }
15
    }
16
}
17