| Total Complexity | 2 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 17 | final class AttributeProfile extends AbstractMdElement |
||
| 18 | { |
||
| 19 | use XMLStringElementTrait; |
||
|
|
|||
| 20 | |||
| 21 | |||
| 22 | /** |
||
| 23 | * Validate the content of the element. |
||
| 24 | * |
||
| 25 | * @param string $content The value to go in the XML textContent |
||
| 26 | * @throws \Exception on failure |
||
| 27 | * @return void |
||
| 28 | */ |
||
| 29 | protected function validateContent(string $content): void |
||
| 30 | { |
||
| 31 | Assert::notEmpty($content, 'AttributeProfile cannot be empty'); |
||
| 32 | } |
||
| 33 | |||
| 34 | |||
| 35 | /** |
||
| 36 | * Convert XML into a AttributeProfile |
||
| 37 | * |
||
| 38 | * @param \DOMElement $xml The XML element we should load |
||
| 39 | * @return self |
||
| 40 | * |
||
| 41 | * @throws \SimpleSAML\XML\Exception\InvalidDOMElementException |
||
| 42 | * If the qualified name of the supplied element is wrong |
||
| 43 | */ |
||
| 44 | public static function fromXML(DOMElement $xml): object |
||
| 50 | } |
||
| 51 | } |
||
| 52 |