Total Complexity | 7 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
13 | class ContentSecurityManager { |
||
14 | |||
15 | private static NonceGenerator $nonceGenerator; |
||
16 | |||
17 | private static array $csp = []; |
||
18 | |||
19 | public static function start(string $nonceGeneratorClass = null) { |
||
20 | $nonceGeneratorClass ??= NonceGenerator::class; |
||
21 | self::$nonceGenerator = new $nonceGeneratorClass(); |
||
22 | } |
||
23 | |||
24 | public static function getNonce(string $name) { |
||
26 | } |
||
27 | |||
28 | public static function isStarted(): bool { |
||
30 | } |
||
31 | |||
32 | public static function addCsp(?bool $reportOnly = null): ContentSecurity { |
||
33 | return self::$csp[] = new ContentSecurity($reportOnly); |
||
34 | } |
||
35 | |||
36 | public static function clearCsp() { |
||
38 | } |
||
39 | |||
40 | public static function addHeadersToResponse(?bool $reportOnly = null): void { |
||
47 |