src/RollbarJsHelper.php
public function scriptTag($content, $headers = null, $nonce = null)
    {
        if ($headers !== null && $this->shouldAppendNonce($headers)) {
            if (!$nonce) {
                throw new \Exception(
                    'Content-Security-Policy is script-src '.
                    'inline-unsafe but nonce value not provided.'
                );
            }
            
            return "\n<script type=\"text/javascript\" nonce=\"$nonce\">$content</script>";
        }
        return "\n<script type=\"text/javascript\">$content</script>";
    }
public function scriptTag($content, $headers = null, $nonce = null)
    {
        if ($headers !== null && $this->shouldAppendNonce($headers)) {
            if (!$nonce) {
                throw new \Exception(
                    'Content-Security-Policy is script-src '.
                    'inline-unsafe but nonce value not provided.'
                );
            }
            
            return "\n<script type=\"text/javascript\" nonce=\"$nonce\">$content</script>";
        }
        return "\n<script type=\"text/javascript\">$content</script>";
    }
public function scriptTag ( $ content , $ headers = null , $ nonce = null ) { if ( $ headers !== null && $ this -> shouldAppendNonce ( $ headers ) ) { if ( ! $ nonce ) { throw new \ Exception ( 'Content-Security-Policy is script-src ' . 'inline-unsafe but nonce value not provided.' ) ; } return "\n<script type=\"text/javascript\" nonce=\"$nonce\">$content</script>" ; } return "\n<script type=\"text/javascript\">$content</script>" ; }
Build safe HTML script tag

@param string $content
@param array $headers
@param

@return string
Build safe HTML script tag