public function getCSPNonce() { if (null === ($nonce = $this->listener->getNonce())) { throw new \RuntimeException('You must enable nonce to use this feature'); } return $nonce; }