Skip to content

Commit

Permalink
Fix return-type
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Dec 19, 2023
1 parent 5e995f8 commit 2b1a1f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ExtendableAttributesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/XPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<int<0, max>, \DOMNameSpaceNode|\DOMNode|null> Array with matching DOM nodes.
*/
public static function xpQuery(DOMNode $node, string $query, DOMXPath $xpCache): array
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Utils/ExtendableAttributesElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;


Expand Down

0 comments on commit 2b1a1f5

Please sign in to comment.