Skip to content

Commit 538c92c

Browse files
committed
Fix Psalm-issues
1 parent 2c209e8 commit 538c92c

5 files changed

Lines changed: 11 additions & 12 deletions

File tree

src/Alg/Signature/AbstractSigner.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ public function getDigest(): string
5151

5252

5353
/**
54-
* @param \SimpleSAML\XMLSecurity\Backend\SignatureBackend
55-
*
54+
* @param \SimpleSAML\XMLSecurity\Backend\SignatureBackend $backend
5655
*/
5756
public function setBackend(SignatureBackend $backend): void
5857
{

src/Constants.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Constants extends \SimpleSAML\XML\Constants
1919
public const DIGEST_SHA512 = 'http://www.w3.org/2001/04/xmlenc#sha512';
2020
public const DIGEST_RIPEMD160 = 'http://www.w3.org/2001/04/xmlenc#ripemd160';
2121

22-
public static $DIGEST_ALGORITHMS = [
22+
public static array $DIGEST_ALGORITHMS = [
2323
self::DIGEST_SHA1 => 'sha1',
2424
self::DIGEST_SHA224 => 'sha224',
2525
self::DIGEST_SHA256 => 'sha256',
@@ -45,7 +45,7 @@ class Constants extends \SimpleSAML\XML\Constants
4545
public const BLOCK_ENC_AES192_GCM = 'http://www.w3.org/2009/xmlenc11#aes192-gcm';
4646
public const BLOCK_ENC_AES256_GCM = 'http://www.w3.org/2009xmlenc11#aes256-gcm';
4747

48-
public static $BLOCK_CIPHER_ALGORITHMS = [
48+
public static array $BLOCK_CIPHER_ALGORITHMS = [
4949
self::BLOCK_ENC_3DES => 'des-ede3-cbc',
5050
self::BLOCK_ENC_AES128 => 'aes-128-cbc',
5151
self::BLOCK_ENC_AES192 => 'aes-192-cbc',
@@ -55,7 +55,7 @@ class Constants extends \SimpleSAML\XML\Constants
5555
self::BLOCK_ENC_AES256_GCM => 'aes-256-gcm',
5656
];
5757

58-
public static $BLOCK_SIZES = [
58+
public static array $BLOCK_SIZES = [
5959
self::BLOCK_ENC_3DES => 8,
6060
self::BLOCK_ENC_AES128 => 16,
6161
self::BLOCK_ENC_AES192 => 16,
@@ -65,7 +65,7 @@ class Constants extends \SimpleSAML\XML\Constants
6565
self::BLOCK_ENC_AES256_GCM => 16,
6666
];
6767

68-
public static $BLOCK_CIPHER_KEY_SIZES = [
68+
public static array $BLOCK_CIPHER_KEY_SIZES = [
6969
self::BLOCK_ENC_3DES => 24,
7070
self::BLOCK_ENC_AES128 => 16,
7171
self::BLOCK_ENC_AES192 => 24,

src/XML/ds/Reference.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
final class Reference extends AbstractDsElement
1717
{
1818
/** @var \SimpleSAML\XMLSecurity\XML\ds\Transforms|null */
19-
protected Transforms $transforms;
19+
protected ?Transforms $transforms;
2020

2121
/** @var \SimpleSAML\XMLSecurity\XML\ds\DigestMethod */
2222
protected DigestMethod $digestMethod;
@@ -71,7 +71,7 @@ public function getTransforms(): ?Transforms
7171

7272

7373
/**
74-
* @param \SimpleSAML\XMLSecurity\XML\ds\Transforms|null
74+
* @param \SimpleSAML\XMLSecurity\XML\ds\Transforms|null $transforms
7575
*/
7676
protected function setTransforms(?Transforms $transforms): void
7777
{

src/XML/ds/Signature.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected function setId(?string $Id): void
8080

8181

8282
/**
83-
* @param \SimpleSAML\XMLSecurity\XML\ds\SignedInfo
83+
* @param \SimpleSAML\XMLSecurity\XML\ds\SignedInfo $signedInfo
8484
*/
8585
protected function setSignedInfo(SignedInfo $signedInfo): void
8686
{
@@ -98,7 +98,7 @@ public function getSignedInfo(): SignedInfo
9898

9999

100100
/**
101-
* @param \SimpleSAML\XMLSecurity\XML\ds\SignatureValue
101+
* @param \SimpleSAML\XMLSecurity\XML\ds\SignatureValue $signatureValue
102102
*/
103103
protected function setSignatureValue(SignatureValue $signatureValue): void
104104
{
@@ -116,7 +116,7 @@ public function getSignatureValue(): SignatureValue
116116

117117

118118
/**
119-
* @param \SimpleSAML\XMLSecurity\XML\ds\KeyInfo|null
119+
* @param \SimpleSAML\XMLSecurity\XML\ds\KeyInfo|null $keyInfo
120120
*/
121121
protected function setKeyInfo(?KeyInfo $keyInfo): void
122122
{

src/XML/ds/Transform.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function getInclusiveNamespaces(): ?InclusiveNamespaces
126126
*
127127
* @param \SimpleSAML\XMLSecurity\XML\ec\InclusiveNamespaces|null $inclusiveNamespaces
128128
*/
129-
private function setInclusiveNamespaces(?InclusiveNamespaces $inclusiveNamespaces)
129+
private function setInclusiveNamespaces(?InclusiveNamespaces $inclusiveNamespaces): void
130130
{
131131
if ($inclusiveNamespaces === null) {
132132
return;

0 commit comments

Comments
 (0)