| Total Complexity | 2 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class Nonce extends Element |
||
| 8 | { |
||
| 9 | public const NAME = 'Nonce'; |
||
| 10 | |||
| 11 | public const ATTRIBUTE_ENCODING_TYPE = 'EncodingType'; |
||
| 12 | |||
| 13 | public const NS_ENCODING = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary'; |
||
| 14 | |||
| 15 | 16 | public function __construct(string $nonce, string $namespace = self::NS_WSSE) |
|
| 16 | { |
||
| 17 | 16 | parent::__construct(self::NAME, $namespace, self::encodeNonce($nonce), [ |
|
| 18 | self::ATTRIBUTE_ENCODING_TYPE => self::NS_ENCODING, |
||
| 19 | ]); |
||
| 20 | } |
||
| 21 | |||
| 22 | 16 | public static function encodeNonce(string $nonce): string |
|
| 25 | } |
||
| 26 | } |
||
| 27 |