| Total Complexity | 5 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | class Metadata implements Signable |
||
| 28 | { |
||
| 29 | /** |
||
| 30 | * @var string |
||
| 31 | */ |
||
| 32 | public $entityId; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var string |
||
| 36 | */ |
||
| 37 | public $assertionConsumerUrl; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @var string |
||
| 41 | */ |
||
| 42 | public $ssoUrl; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @var string |
||
| 46 | */ |
||
| 47 | public $idpCertificateFile; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @var DOMDocument |
||
| 51 | */ |
||
| 52 | public $document; |
||
| 53 | |||
| 54 | public function getRootDomElement(): DOMElement |
||
| 55 | { |
||
| 56 | if (!$this->document) { |
||
| 57 | throw new LogicException('Cannot get the rootElement of Metadata before the document has been generated'); |
||
| 58 | } |
||
| 59 | |||
| 60 | return $this->document->documentElement; |
||
| 61 | } |
||
| 62 | |||
| 63 | public function getAppendBeforeNode(): ?DOMNode |
||
| 64 | { |
||
| 65 | if (!$this->document) { |
||
| 66 | throw new LogicException( |
||
| 67 | 'Cannot get the appendBeforeNode of Metadata before the document has been generated' |
||
| 68 | ); |
||
| 69 | } |
||
| 70 | |||
| 71 | return $this->document->documentElement->childNodes->item(0); |
||
| 72 | } |
||
| 73 | |||
| 74 | public function __toString() |
||
| 77 | } |
||
| 78 | } |
||
| 79 |