SecurityHeader::all()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
c 0
b 0
f 0
ccs 0
cts 2
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php declare(strict_types=1);
2
3
/**
4
 * @license  http://opensource.org/licenses/mit-license.php MIT
5
 * @link     https://github.com/nicoSWD
6
 * @author   Nicolas Oelgart <[email protected]>
7
 */
8
namespace nicoSWD\SecHeaderCheck\Domain\Header;
9
10
final class SecurityHeader
11
{
12
    public const CONTENT_SECURITY_POLICY = 'content-security-policy';
13
    public const EXPECT_CT = 'expect-ct';
14
    public const REFERRER_POLICY = 'referrer-policy';
15
    public const SET_COOKIE = 'set-cookie';
16
    public const SERVER = 'server';
17
    public const STRICT_TRANSPORT_SECURITY = 'strict-transport-security';
18
    public const X_FRAME_OPTIONS = 'x-frame-options';
19
    public const X_CONTENT_TYPE_OPTIONS = 'x-content-type-options';
20
    public const X_POWERED_BY = 'x-powered-by';
21
    public const X_XSS_PROTECTION = 'x-xss-protection';
22
23
    public function all(): array
24
    {
25
        return (new \ReflectionClass($this))->getConstants();
26
    }
27
}
28