| Conditions | 4 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | protected static function validHMACOutputLength(string $value, string $message = ''): void |
||
| 33 | { |
||
| 34 | try { |
||
| 35 | parent::regex( |
||
| 36 | $value, |
||
| 37 | self::$HMACOutputLength_regex, |
||
| 38 | $message ?: '%s is not a valid ds:HMACOutputLengthType', |
||
| 39 | ); |
||
| 40 | } catch (AssertionFailedException $e) { |
||
| 41 | throw new SchemaViolationException($e->getMessage()); |
||
| 42 | } |
||
| 43 | |||
| 44 | try { |
||
| 45 | parent::true( |
||
| 46 | intval($value) % 8 === 0, |
||
| 47 | '%s is not devisible by 8 and therefore not a valid ds:HMACOutputLengthType', |
||
| 48 | ); |
||
| 49 | } catch (AssertionFailedException $e) { |
||
| 50 | throw new ProtocolViolationException($e->getMessage()); |
||
| 51 | } |
||
| 54 |