| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | trait DerivationContextTrait |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * Setter for the derivation context/application information string property. |
||
| 26 | * |
||
| 27 | * @param string $contextualString The derivation context/application information string. |
||
| 28 | * |
||
| 29 | * @return $this The hash algorithm object. |
||
| 30 | * @throw \Exception Validation errors. |
||
| 31 | */ |
||
| 32 | public function setContextualString($contextualString) |
||
| 33 | { |
||
| 34 | if (!is_string($contextualString)) { |
||
|
1 ignored issue
–
show
|
|||
| 35 | throw new \InvalidArgumentException('The context information string must be of type string.'); |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->contextualString = $contextualString; |
||
| 39 | |||
| 40 | return $this; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Getter for the derivation context/application information string property. |
||
| 45 | * |
||
| 46 | * @return string The derivation context/application information string. |
||
| 47 | */ |
||
| 48 | public function getContextualString() |
||
| 51 | } |
||
| 52 | } |
||
| 53 |