| Total Complexity | 3 | 
| Total Lines | 42 | 
| 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 | * @param string $content | ||
| 24 | */ | ||
| 25 | public function __construct(string $content) | ||
| 26 |     { | ||
| 27 | $this->setContent($content); | ||
| 28 | } | ||
| 29 | |||
| 30 | |||
| 31 | /** | ||
| 32 | * Validate the content of the element. | ||
| 33 | * | ||
| 34 | * @param string $content The value to go in the XML textContent | ||
| 35 | * @throws \Exception on failure | ||
| 36 | * @return void | ||
| 37 | */ | ||
| 38 | protected function validateContent(string $content): void | ||
| 39 |     { | ||
| 40 | Assert::notEmpty($content, 'AttributeProfile cannot be empty'); | ||
| 41 | } | ||
| 42 | |||
| 43 | |||
| 44 | /** | ||
| 45 | * Convert XML into a AttributeProfile | ||
| 46 | * | ||
| 47 | * @param \DOMElement $xml The XML element we should load | ||
| 48 | * @return self | ||
| 49 | * | ||
| 50 | * @throws \SimpleSAML\XML\Exception\InvalidDOMElementException | ||
| 51 | * If the qualified name of the supplied element is wrong | ||
| 52 | */ | ||
| 53 | public static function fromXML(DOMElement $xml): object | ||
| 59 | } | ||
| 60 | } | ||
| 61 |