Skip to content

Commit

Permalink
Use preffered way to pass nullable items
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen authored Jul 27, 2024
1 parent 14638b0 commit 7e6ce97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/XML/xenc/EncryptedData.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
use SimpleSAML\XMLSecurity\XML\xenc\CipherData;
use SimpleSAML\XMLSecurity\XML\xenc\EncryptionMethod;

use function array_pop;

/**
* Class containing encrypted data.
*
Expand Down Expand Up @@ -73,8 +75,8 @@ final public static function fromXML(DOMElement $xml): static
self::getOptionalAttribute($xml, 'Type', null),
self::getOptionalAttribute($xml, 'MimeType', null),
self::getOptionalAttribute($xml, 'Encoding', null),
count($encryptionMethod) === 1 ? $encryptionMethod[0] : null,
count($keyInfo) === 1 ? $keyInfo[0] : null,
array_pop($encryptionMethod[0]),

Check failure on line 78 in src/XML/xenc/EncryptedData.php

View workflow job for this annotation

GitHub Actions / Quality control

Parameter #1 $array of function array_pop expects array, SimpleSAML\XMLSecurity\XML\xenc\EncryptionMethod given.
array_pop($keyInfo[0]),

Check failure on line 79 in src/XML/xenc/EncryptedData.php

View workflow job for this annotation

GitHub Actions / Quality control

Parameter #1 $array of function array_pop expects array, SimpleSAML\XMLSecurity\XML\ds\KeyInfo given.
);
}
}

0 comments on commit 7e6ce97

Please sign in to comment.