src/CSPBuilder.php
public function setDirective(string $key, $value = []): self
    {
        $this->policies[$key] = $value;
        return $this;
    }
public function setDirective(string $key, $value = []): self
    {
        $this->policies[$key] = $value;
        return $this;
    }
public function setDirective ( string $ key , $ value = [ ] ) : self { $ this -> policies [ $ key ] = $ value ; return $ this ; }
Set a directive.

This lets you overwrite a complex directive entirely (e.g. script-src)
or set a top-level directive (e.g. report-uri).

@param string $key
@param mixed $value

@return self
Set a directive .