public function removeCSPSource($directive, $source, $reportOnly = null)
    {
        Types::assert(['string' => [$directive, $source]]);

        $csp = &$this->getCSPObject($reportOnly);

        $source = strtolower($source);
        $directive = strtolower($directive);

        if ( ! isset($csp[$directive][$source]))
        {
            return false;
        }

        unset($csp[$directive][$source]);

        return true;
    }
public function removeCSPSource($directive, $source, $reportOnly = null)
    {
        Types::assert(['string' => [$directive, $source]]);

        $csp = &$this->getCSPObject($reportOnly);

        $source = strtolower($source);
        $directive = strtolower($directive);

        if ( ! isset($csp[$directive][$source]))
        {
            return false;
        }

        unset($csp[$directive][$source]);

        return true;
    }
public function removeCSPSource ( $ directive , $ source , $ reportOnly = null ) { Types :: assert ( [ 'string' => [ $ directive , $ source ] ] ) ; $ csp = & $ this -> getCSPObject ( $ reportOnly ) ; $ source = strtolower ( $ source ) ; $ directive = strtolower ( $ directive ) ; if ( ! isset ( $ csp [ $ directive ] [ $ source ] ) ) { return false ; } unset ( $ csp [ $ directive ] [ $ source ] ) ; return true ; }
Remove a previously added source from a CSP directive.

@api

@param string $directive
The directive (case insensitive) in which the source to be removed
resides.
@param string $source
The source (case insensitive) to remove.
@param mixed $reportOnly
Loosely casted as a boolean, `true` ensures the function acts on the
report only policy, `false` (the default, as `null` casts to false)
ensures the function acts on the enforced policy.

@return void
Remove a previously added source from a CSP directive .