diff --git a/src/ExtendableAttributesTrait.php b/src/ExtendableAttributesTrait.php index af5090a..eda2b60 100644 --- a/src/ExtendableAttributesTrait.php +++ b/src/ExtendableAttributesTrait.php @@ -89,11 +89,11 @@ public function getAttributesNS(): array * NOTE: In case the namespace is ##any, this method will also return local non-namespaced attributes! * * @param \DOMElement $xml - * @param string|array|null $namespace + * @param \SimpleSAML\XML\XsNamespace|array|null $namespace * * @return list<\SimpleSAML\XML\Attribute> $attributes */ - protected static function getAttributesNSFromXML(DOMElement $xml, string|array $namespace = null): array + protected static function getAttributesNSFromXML(DOMElement $xml, NS|array $namespace = null): array { $namespace = $namespace ?? static::XS_ANY_ATTR_NAMESPACE; $attributes = []; diff --git a/src/Utils/XPath.php b/src/Utils/XPath.php index ac0f3ad..c7203db 100644 --- a/src/Utils/XPath.php +++ b/src/Utils/XPath.php @@ -49,7 +49,7 @@ public static function getXPath(DOMNode $node): DOMXPath * @param \DOMNode $node The XML node. * @param string $query The query. * @param \DOMXPath $xpCache The DOMXPath object - * @return \DOMNode[] Array with matching DOM nodes. + * @return array, \DOMNameSpaceNode|\DOMNode|null> Array with matching DOM nodes. */ public static function xpQuery(DOMNode $node, string $query, DOMXPath $xpCache): array { diff --git a/tests/Utils/ExtendableAttributesElement.php b/tests/Utils/ExtendableAttributesElement.php index 368d657..faebdbd 100644 --- a/tests/Utils/ExtendableAttributesElement.php +++ b/tests/Utils/ExtendableAttributesElement.php @@ -31,7 +31,7 @@ class ExtendableAttributesElement extends AbstractElement /** @var string */ public const LOCALNAME = 'ExtendableAttributesElement'; - /** @var string|array */ + /** @var string|\SimpleSAML\XML\XsNamespace */ public const XS_ANY_ATTR_NAMESPACE = NS::ANY;