simplesamlphp /
xml-soap
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace SimpleSAML\SOAP12\XML; |
||
| 6 | |||
| 7 | use DOMElement; |
||
| 8 | use SimpleSAML\SOAP12\Assert\Assert; |
||
| 9 | use SimpleSAML\XML\ExtendableAttributesTrait; |
||
| 10 | use SimpleSAML\XML\ExtendableElementTrait; |
||
| 11 | use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException; |
||
| 12 | use SimpleSAML\XMLSchema\XML\Constants\NS; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Class representing a env:Detail element. |
||
| 16 | * |
||
| 17 | * @package simplesaml/xml-soap |
||
| 18 | */ |
||
| 19 | final class Detail extends AbstractSoapElement |
||
| 20 | { |
||
| 21 | use ExtendableAttributesTrait; |
||
| 22 | use ExtendableElementTrait; |
||
| 23 | |||
| 24 | |||
| 25 | /** The namespace-attribute for the xs:any element */ |
||
| 26 | public const XS_ANY_ELT_NAMESPACE = NS::ANY; |
||
| 27 | |||
| 28 | /** The namespace-attribute for the xs:anyAttribute element */ |
||
| 29 | public const XS_ANY_ATTR_NAMESPACE = NS::OTHER; |
||
| 30 | |||
| 31 | |||
| 32 | /** |
||
| 33 | * Initialize a soap:Detail |
||
| 34 | * |
||
| 35 | * @param list<\SimpleSAML\XML\SerializableElementInterface> $children |
||
| 36 | * @param list<\SimpleSAML\XML\Attribute> $namespacedAttributes |
||
|
0 ignored issues
–
show
|
|||
| 37 | */ |
||
| 38 | public function __construct(array $children = [], array $namespacedAttributes = []) |
||
| 39 | { |
||
| 40 | $this->setElements($children); |
||
| 41 | $this->setAttributesNS($namespacedAttributes); |
||
| 42 | } |
||
| 43 | |||
| 44 | |||
| 45 | /** |
||
| 46 | * Test if an object, at the state it's in, would produce an empty XML-element |
||
| 47 | * |
||
| 48 | * @return bool |
||
| 49 | */ |
||
| 50 | public function isEmptyElement(): bool |
||
| 51 | { |
||
| 52 | return empty($this->elements) && empty($this->namespacedAttributes); |
||
| 53 | } |
||
| 54 | |||
| 55 | |||
| 56 | /* |
||
| 57 | * Convert XML into an Detail element |
||
| 58 | * |
||
| 59 | * @param \DOMElement $xml The XML element we should load |
||
| 60 | * @return static |
||
| 61 | * |
||
| 62 | * @throws \SimpleSAML\XMLSchema\Exception\InvalidDOMElementException |
||
| 63 | * If the qualified name of the supplied element is wrong |
||
| 64 | */ |
||
| 65 | public static function fromXML(DOMElement $xml): static |
||
| 66 | { |
||
| 67 | Assert::same($xml->localName, 'Detail', InvalidDOMElementException::class); |
||
| 68 | Assert::same($xml->namespaceURI, Detail::NS, InvalidDOMElementException::class); |
||
| 69 | |||
| 70 | return new static( |
||
| 71 | self::getChildElementsFromXML($xml), |
||
| 72 | self::getAttributesNSFromXML($xml), |
||
| 73 | ); |
||
| 74 | } |
||
| 75 | |||
| 76 | |||
| 77 | /** |
||
| 78 | * Convert this Detail to XML. |
||
| 79 | * |
||
| 80 | * @param \DOMElement|null $parent The element we should add this Detail to. |
||
| 81 | * @return \DOMElement This Detail-element. |
||
| 82 | */ |
||
| 83 | public function toXML(?DOMElement $parent = null): DOMElement |
||
| 84 | { |
||
| 85 | $e = $this->instantiateParentElement($parent); |
||
| 86 | |||
| 87 | foreach ($this->getAttributesNS() as $attr) { |
||
| 88 | $attr->toXML($e); |
||
| 89 | } |
||
| 90 | |||
| 91 | foreach ($this->getElements() as $child) { |
||
| 92 | $child->toXML($e); |
||
| 93 | } |
||
| 94 | |||
| 95 | return $e; |
||
| 96 | } |
||
| 97 | } |
||
| 98 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths