protected function addGeneratedNonce(array $config): array
    {
        if (($config['csp']['script-src']['add-generated-nonce'] ?? false) === true) {
            $config['csp']['script-src']['nonces'][] = self::nonce();
        }

        if (($config['csp']['style-src']['add-generated-nonce'] ?? false) === true) {
            $config['csp']['style-src']['nonces'][] = self::nonce();
        }

        return $config;
    }
protected function addGeneratedNonce(array $config): array
    {
        if (($config['csp']['script-src']['add-generated-nonce'] ?? false) === true) {
            $config['csp']['script-src']['nonces'][] = self::nonce();
        }

        if (($config['csp']['style-src']['add-generated-nonce'] ?? false) === true) {
            $config['csp']['style-src']['nonces'][] = self::nonce();
        }

        return $config;
    }
protected function addGeneratedNonce ( array $ config ) : array { if ( ( $ config [ 'csp' ] [ 'script-src' ] [ 'add-generated-nonce' ] ?? false ) === true ) { $ config [ 'csp' ] [ 'script-src' ] [ 'nonces' ] [ ] = self :: nonce ( ) ; } if ( ( $ config [ 'csp' ] [ 'style-src' ] [ 'add-generated-nonce' ] ?? false ) === true ) { $ config [ 'csp' ] [ 'style-src' ] [ 'nonces' ] [ ] = self :: nonce ( ) ; } return $ config ; }
Add generated nonce value to script-src and style-src.

@param array $config

@return array
Add generated nonce value to script - src and style - src .