Completed
Push — master ( 75955e...d5bb65 )
by Freek
01:22
created

Basic   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A configure() 0 14 1
1
<?php
2
3
namespace Spatie\Csp\Policies;
4
5
use Spatie\Csp\Directive;
6
7
class Basic extends Policy
8
{
9
    public function configure()
10
    {
11
        $this
12
            ->addDirective(Directive::CONNECT, 'self')
13
            ->addDirective(Directive::DEFAULT, 'self')
14
            ->addDirective(Directive::FORM_ACTION, 'self')
15
            ->addDirective(Directive::IMG, 'self')
16
            ->addDirective(Directive::MEDIA, 'self')
17
            ->addDirective(Directive::SCRIPT, 'self')
18
            ->addDirective(Directive::STYLE, 'self')
19
            ->addDirective(Directive::OBJECT, 'none')
20
            ->addNonceForDirective(Directive::SCRIPT)
21
            ->addNonceForDirective(Directive::STYLE);
22
    }
23
}
24