| Total Complexity | 3 | 
| Total Lines | 39 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 17 | class DecisionTypeValue extends StringValue | ||
| 18 | { | ||
| 19 | /** @var string */ | ||
| 20 | public const SCHEMA_TYPE = 'decisionType'; | ||
| 21 | |||
| 22 | |||
| 23 | /** | ||
| 24 | * Validate the value. | ||
| 25 | * | ||
| 26 | * @param string $value The value | ||
| 27 | * @throws \Exception on failure | ||
| 28 | * @return void | ||
| 29 | */ | ||
| 30 | protected function validateValue(string $value): void | ||
| 31 |     { | ||
| 32 | Assert::oneOf( | ||
| 33 | $this->sanitizeValue($value), | ||
| 34 | array_column(DecisionTypeEnum::cases(), 'value'), | ||
| 35 | SchemaViolationException::class, | ||
| 36 | ); | ||
| 37 | } | ||
| 38 | |||
| 39 | |||
| 40 | /** | ||
| 41 | * @param \SimpleSAML\SAML2\XML\saml\DecisionTypeEnum $value | ||
| 42 | * @return static | ||
| 43 | */ | ||
| 44 | public static function fromEnum(DecisionTypeEnum $value): static | ||
| 47 | } | ||
| 48 | |||
| 49 | |||
| 50 | /** | ||
| 51 | * @return \SimpleSAML\SAML2\XML\saml\DecisionTypeEnum $value | ||
| 52 | */ | ||
| 53 | public function toEnum(): DecisionTypeEnum | ||
| 56 | } | ||
| 57 | } | ||
| 58 |