Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/github_actions/all-actions-1a25…
Browse files Browse the repository at this point in the history
…05a5f7
  • Loading branch information
tvdijen authored Feb 3, 2024
2 parents 38f5788 + f7bb0ae commit 29eb94c
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion phpstan-dev.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parameters:
level: 9
level: 6
paths:
- tests
4 changes: 2 additions & 2 deletions tests/Key/PrivateKeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
*/
final class PrivateKeyTest extends TestCase
{
/** @var array */
protected static $privKey = [];
/** @var array<string, string|int> */
protected static array $privKey = [];

/** @var string */
protected static string $f;
Expand Down
4 changes: 2 additions & 2 deletions tests/Key/PublicKeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
*/
final class PublicKeyTest extends TestCase
{
/** @var array */
protected static $pubKey = [];
/** @var array<string, string|array<string>> */
protected static array $pubKey = [];

/** @var string */
protected static string $f;
Expand Down
4 changes: 2 additions & 2 deletions tests/Key/X509CertificateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
*/
final class X509CertificateTest extends TestCase
{
/** @var array */
protected static $cert = [];
/** @var array<string, string|int> */
protected static array $cert = [];

/** @var string */
protected static string $f;
Expand Down
2 changes: 1 addition & 1 deletion tests/XML/CustomSignable.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class CustomSignable extends AbstractElement implements
*
* @param \DOMElement $xml
*/
public function __construct(
final public function __construct(
protected DOMElement $xml,
protected ?string $id
) {
Expand Down
2 changes: 2 additions & 0 deletions tests/XML/SignableElementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ public function testSigningElementWithIdAndComments(): void
public function testSigningDocumentWithoutRoot(): void
{
$doc = new DOMDocument('1.0', 'UTF-8');
/** @var \DOMElement $node */
$node = $doc->importNode(self::$xmlRepresentation->documentElement, true);
$customSignable = CustomSignable::fromXML($node);
$factory = new SignatureAlgorithmFactory();
Expand All @@ -238,6 +239,7 @@ public function testSigningDocumentWithoutRoot(): void
public function testSigningWithDifferentRoot(): void
{
$doc = DOMDocumentFactory::fromString('<ns:Root><ns:foo>bar</ns:foo></ns:Root>');
/** @var \DOMElement $node */
$node = $doc->importNode(self::$xmlRepresentation->documentElement, true);
$doc->appendChild($node);
$customSignable = CustomSignable::fromXML($node);
Expand Down
1 change: 1 addition & 0 deletions tests/XML/ds/RSAKeyValueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function testMarshallingElementOrder(): void
$modulus = XPath::xpQuery($RSAKeyValueElement, './ds:Modulus', $xpCache);
$this->assertCount(1, $modulus);

/** @var \DOMElement[] $RSAKeyValueElements */
$RSAKeyValueElements = XPath::xpQuery($RSAKeyValueElement, './ds:Modulus/following-sibling::*', $xpCache);

// Test ordering of RSAKeyValue contents
Expand Down
1 change: 1 addition & 0 deletions tests/XML/ds/SignatureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public function testMarshallingElementOrdering(): void
$signedInfo = XPath::xpQuery($signatureElement, './ds:SignedInfo', $xpCache);
$this->assertCount(1, $signedInfo);

/** @var \DOMElement[] $signatureElements */
$signatureElements = XPath::xpQuery($signatureElement, './ds:SignedInfo/following-sibling::*', $xpCache);

// Test ordering of Signature contents
Expand Down

0 comments on commit 29eb94c

Please sign in to comment.