Skip to content

Commit

Permalink
PHPStan Baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
Spomky committed Feb 5, 2024
1 parent 63f04bf commit e5c417b
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 180 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ block_comment_end = */
[{*.yml,*.yaml}]
indent_size = 2

[*.neon]
indent_style = tab

[*.md]
trim_trailing_whitespace = false

Expand Down
345 changes: 170 additions & 175 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,176 +1,171 @@
parameters:
ignoreErrors:
-
message: "#^Cannot cast mixed to string\\.$#"
count: 1
path: src/Algorithm/Mac/Hmac.php

-
message: "#^Method Cose\\\\Algorithm\\\\Signature\\\\ECDSA\\\\ECSignature\\:\\:fromAsn1\\(\\) should return string but returns string\\|false\\.$#"
count: 1
path: src/Algorithm/Signature/ECDSA/ECSignature.php

-
message: "#^Method Cose\\\\Algorithm\\\\Signature\\\\ECDSA\\\\ECSignature\\:\\:toAsn1\\(\\) should return string but returns string\\|false\\.$#"
count: 1
path: src/Algorithm/Signature/ECDSA/ECSignature.php

-
message: "#^Parameter \\#1 \\$signature of function sodium_crypto_sign_verify_detached expects non\\-empty\\-string, string given\\.$#"
count: 1
path: src/Algorithm/Signature/EdDSA/EdDSA.php

-
message: "#^Parameter \\#2 \\$secret_key of function sodium_crypto_sign_detached expects non\\-empty\\-string, string given\\.$#"
count: 2
path: src/Algorithm/Signature/EdDSA/EdDSA.php

-
message: "#^Parameter \\#3 \\$public_key of function sodium_crypto_sign_verify_detached expects non\\-empty\\-string, string given\\.$#"
count: 1
path: src/Algorithm/Signature/EdDSA/EdDSA.php

-
message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, int given\\.$#"
count: 1
path: src/Algorithm/Signature/RSA/PSSRSA.php

-
message: "#^Parameter \\#1 \\$array of function current expects array\\|object, array\\|false given\\.$#"
count: 1
path: src/BigInteger.php

-
message: "#^Parameter \\#1 \\$string of function ltrim expects string, string\\|false given\\.$#"
count: 1
path: src/BigInteger.php

-
message: "#^Cannot cast mixed to string\\.$#"
count: 2
path: src/Key/Ec2Key.php

-
message: "#^Method Cose\\\\Key\\\\Ec2Key\\:\\:curve\\(\\) should return int\\|string but returns mixed\\.$#"
count: 1
path: src/Key/Ec2Key.php

-
message: "#^Method Cose\\\\Key\\\\Ec2Key\\:\\:d\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/Ec2Key.php

-
message: "#^Method Cose\\\\Key\\\\Ec2Key\\:\\:x\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/Ec2Key.php

-
message: "#^Method Cose\\\\Key\\\\Ec2Key\\:\\:y\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/Ec2Key.php

-
message: "#^Cannot cast mixed to int\\.$#"
count: 1
path: src/Key/Key.php

-
message: "#^Method Cose\\\\Key\\\\Key\\:\\:type\\(\\) should return int\\|string but returns mixed\\.$#"
count: 1
path: src/Key/Key.php

-
message: "#^Method Cose\\\\Key\\\\OkpKey\\:\\:curve\\(\\) should return int\\|string but returns mixed\\.$#"
count: 1
path: src/Key/OkpKey.php

-
message: "#^Method Cose\\\\Key\\\\OkpKey\\:\\:d\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/OkpKey.php

-
message: "#^Method Cose\\\\Key\\\\OkpKey\\:\\:x\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/OkpKey.php

-
message: "#^Cannot cast mixed to int\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:QInv\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:d\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:dI\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:dP\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:dQ\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:e\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:n\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:other\\(\\) should return array but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:p\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:q\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:rI\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:tI\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Parameter \\#1 \\$array of function current expects array\\|object, array\\|false given\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Cannot cast mixed to int\\.$#"
count: 1
path: src/Key/SymmetricKey.php

-
message: "#^Method Cose\\\\Key\\\\SymmetricKey\\:\\:k\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/SymmetricKey.php
ignoreErrors:
-
message: "#^Cannot cast mixed to string\\.$#"
count: 1
path: src/Algorithm/Mac/Hmac.php

-
message: "#^Method Cose\\\\Algorithm\\\\Signature\\\\ECDSA\\\\ECSignature\\:\\:fromAsn1\\(\\) should return string but returns string\\|false\\.$#"
count: 1
path: src/Algorithm/Signature/ECDSA/ECSignature.php

-
message: "#^Method Cose\\\\Algorithm\\\\Signature\\\\ECDSA\\\\ECSignature\\:\\:toAsn1\\(\\) should return string but returns string\\|false\\.$#"
count: 1
path: src/Algorithm/Signature/ECDSA/ECSignature.php

-
message: "#^Parameter \\#1 \\$signature of function sodium_crypto_sign_verify_detached expects non\\-empty\\-string, string given\\.$#"
count: 1
path: src/Algorithm/Signature/EdDSA/EdDSA.php

-
message: "#^Parameter \\#2 \\$secret_key of function sodium_crypto_sign_detached expects non\\-empty\\-string, string given\\.$#"
count: 2
path: src/Algorithm/Signature/EdDSA/EdDSA.php

-
message: "#^Parameter \\#3 \\$public_key of function sodium_crypto_sign_verify_detached expects non\\-empty\\-string, string given\\.$#"
count: 1
path: src/Algorithm/Signature/EdDSA/EdDSA.php

-
message: "#^Parameter \\#1 \\$length of function random_bytes expects int\\<1, max\\>, int given\\.$#"
count: 1
path: src/Algorithm/Signature/RSA/PSSRSA.php

-
message: "#^Parameter \\#1 \\$array of function current expects array\\|object, array\\|false given\\.$#"
count: 1
path: src/BigInteger.php

-
message: "#^Parameter \\#1 \\$string of function ltrim expects string, string\\|false given\\.$#"
count: 1
path: src/BigInteger.php

-
message: "#^Cannot cast mixed to string\\.$#"
count: 2
path: src/Key/Ec2Key.php

-
message: "#^Method Cose\\\\Key\\\\Ec2Key\\:\\:curve\\(\\) should return int\\|string but returns mixed\\.$#"
count: 1
path: src/Key/Ec2Key.php

-
message: "#^Method Cose\\\\Key\\\\Ec2Key\\:\\:d\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/Ec2Key.php

-
message: "#^Method Cose\\\\Key\\\\Ec2Key\\:\\:x\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/Ec2Key.php

-
message: "#^Method Cose\\\\Key\\\\Ec2Key\\:\\:y\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/Ec2Key.php

-
message: "#^Cannot cast mixed to int\\.$#"
count: 1
path: src/Key/Key.php

-
message: "#^Method Cose\\\\Key\\\\Key\\:\\:type\\(\\) should return int\\|string but returns mixed\\.$#"
count: 1
path: src/Key/Key.php

-
message: "#^Method Cose\\\\Key\\\\OkpKey\\:\\:curve\\(\\) should return int\\|string but returns mixed\\.$#"
count: 1
path: src/Key/OkpKey.php

-
message: "#^Method Cose\\\\Key\\\\OkpKey\\:\\:d\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/OkpKey.php

-
message: "#^Method Cose\\\\Key\\\\OkpKey\\:\\:x\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/OkpKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:QInv\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:d\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:dI\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:dP\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:dQ\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:e\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:n\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:other\\(\\) should return array but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:p\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:q\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:rI\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Method Cose\\\\Key\\\\RsaKey\\:\\:tI\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Parameter \\#1 \\$array of function current expects array\\|object, array\\|false given\\.$#"
count: 1
path: src/Key/RsaKey.php

-
message: "#^Cannot cast mixed to int\\.$#"
count: 1
path: src/Key/SymmetricKey.php

-
message: "#^Method Cose\\\\Key\\\\SymmetricKey\\:\\:k\\(\\) should return string but returns mixed\\.$#"
count: 1
path: src/Key/SymmetricKey.php
10 changes: 5 additions & 5 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
parameters:
level: max
paths:
- src
level: max
paths:
- src

includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
- phpstan-baseline.neon
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
- phpstan-baseline.neon

0 comments on commit e5c417b

Please sign in to comment.