src/HttpHeaders/Security/ContentSecurityPolicyMiddleware.php
public function addPluginType(string $mediaType):bool
    {
        if (!preg_match('#^[-\w]+/[-\w]+$#ui', $mediaType)) {
            throw new MiddlewareException(
                $this,
                sprintf(
                    "'%s' is not a valid media type and can not be used as a CSP plugin type",
                    $mediaType
                )
            );
        }
        if (!in_array($mediaType, $this->tags['plugin-types'])) {
            $this->tags['plugin-types'][] = $mediaType;
            return true;
        }
        return false;
    }
public function addPluginType(string $mediaType):bool
    {
        if (!preg_match('#^[-\w]+/[-\w]+$#ui', $mediaType)) {
            throw new MiddlewareException(
                $this,
                sprintf(
                    "'%s' is not a valid media type and can not be used as a CSP plugin type",
                    $mediaType
                )
            );
        }
        if (!in_array($mediaType, $this->tags['plugin-types'])) {
            $this->tags['plugin-types'][] = $mediaType;
            return true;
        }
        return false;
    }
public function addPluginType ( string $ mediaType ) : bool { if ( ! preg_match ( '#^[-\w]+/[-\w]+$#ui' , $ mediaType ) ) { throw new MiddlewareException ( $ this , sprintf ( "'%s' is not a valid media type and can not be used as a CSP plugin type" , $ mediaType ) ) ; } if ( ! in_array ( $ mediaType , $ this -> tags [ 'plugin-types' ] ) ) { $ this -> tags [ 'plugin-types' ] [ ] = $ mediaType ; return true ; } return false ; }
Add a new plugin media type ot the CSP.

@link https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/plugin-types
@param string $mediaType
@throws MiddlewareException
@return bool
Add a new plugin media type ot the CSP .