Completed
Push — master ( 299de3...93b43e )
by Alexander
02:01
created

header_remove()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
namespace Yiisoft\Yii\Web\Emitter;
3
4
use Yiisoft\Yii\Web\Tests\Emitter\HTTPFunctions;
5
6
if (!function_exists(__NAMESPACE__ . '\\headers_sent')) {
7
    /**
8
     * Mock for the headers_sent() function for Emitter class.
9
     */
10
    function headers_sent(): bool
11
    {
12
        return false;
13
    }
14
15
    /**
16
     * Mock for the header() function for Emitter class.
17
     */
18
    function header(string $string, bool $replace = true, ?int $http_response_code = null): void
19
    {
20
        HTTPFunctions::header($string, $replace, $http_response_code);
21
    }
22
23
    /**
24
     * Mock for the header_remove() function for Emitter class.
25
     */
26
    function header_remove(): void
27
    {
28
        HTTPFunctions::header_remove();
29
    }
30
31
    /**
32
     * Mock for the header_list() function for Emitter class.
33
     */
34
    function header_list(): array
35
    {
36
        return HTTPFunctions::headers_list();
37
    }
38
39
    /**
40
     * Mock for the http_response_code() function for Emitter class.
41
     */
42
    function http_response_code(?int $response_code = null): int
43
    {
44
        return HTTPFunctions::http_response_code($response_code);
45
    }
46
}
47