Passed
Push — master ( 6c41a6...c3c8a7 )
by Bjørn
02:45
created

Header::setHeader()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
namespace WebPConvert\Serve;
3
4
/**
5
 * Add / Set HTTP header.
6
 *
7
 * This class does nothing more than adding two convenience functions for calling the "header" function.
8
 *
9
 * @package    WebPConvert
10
 * @author     Bjørn Rosell <[email protected]>
11
 * @since      Class available since Release 2.0.0
12
 */
13
class Header
14
{
15 8
    public static function addHeader($header)
16
    {
17 8
        header($header, false);
18 8
    }
19
20 8
    public static function setHeader($header)
21
    {
22 8
        header($header, true);
23 8
    }
24
}
25