src/HttpHeaders/Security/ContentSecurityPolicyMiddleware.php
public function addReportUri(string $reportUri):bool
    {
        if (!filter_var($reportUri, FILTER_VALIDATE_URL)) {
            throw new MiddlewareException(
                $this,
                sprintf(
                    "'%s' is not a valid URI and can not be set as the CSP report URI",
                    $reportUri
                )
            );
        }
        if (!in_array($reportUri, $this->tags['report-uri'])) {
            $this->tags['report-uri'][] = $reportUri;
            return true;
        }
        return false;
    }
public function addReportUri(string $reportUri):bool
    {
        if (!filter_var($reportUri, FILTER_VALIDATE_URL)) {
            throw new MiddlewareException(
                $this,
                sprintf(
                    "'%s' is not a valid URI and can not be set as the CSP report URI",
                    $reportUri
                )
            );
        }
        if (!in_array($reportUri, $this->tags['report-uri'])) {
            $this->tags['report-uri'][] = $reportUri;
            return true;
        }
        return false;
    }
public function addReportUri ( string $ reportUri ) : bool { if ( ! filter_var ( $ reportUri , FILTER_VALIDATE_URL ) ) { throw new MiddlewareException ( $ this , sprintf ( "'%s' is not a valid URI and can not be set as the CSP report URI" , $ reportUri ) ) ; } if ( ! in_array ( $ reportUri , $ this -> tags [ 'report-uri' ] ) ) { $ this -> tags [ 'report-uri' ] [ ] = $ reportUri ; return true ; } return false ; }
Sets the CSP's report URI.

@link https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri
@param string $reportUri
@throws MiddlewareException
@return bool
Sets the CSP s report URI .