Skip to content

Commit

Permalink
Fix phpstan issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Sep 16, 2024
1 parent 91e31f5 commit 30f5b1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/XML/ds/KeyInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use SimpleSAML\XML\XsNamespace as NS;
use SimpleSAML\XMLSecurity\Constants as C;
use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException;
use SimpleSAML\XMLSecurity\XML\ds\AbstractDsElement;

/**
* Class representing a ds:KeyInfo element.
Expand Down Expand Up @@ -53,7 +54,7 @@ public function __construct(
Assert::nullOrValidNCName($Id);

foreach ($info as $item) {
if ($item->getNamespaceURI() === static::NS) {
if ($item instanceof AbstractDsElement) {
Assert::isInstanceOfAny(
$item,
[KeyName::class, KeyValue::class, RetrievalMethod::class, X509Data::class],
Expand Down

0 comments on commit 30f5b1c

Please sign in to comment.