-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #226 from Icinga/extend-phpstan
Run phpstan for all supported PHP versions
- Loading branch information
Showing
6 changed files
with
214 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Parameter \\#1 \\$x509certdata of function openssl_x509_read expects resource\\|string, mixed given\\.$#" | ||
count: 1 | ||
path: application/clicommands/ImportCommand.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$data of function bin2hex expects string, mixed given\\.$#" | ||
count: 2 | ||
path: library/X509/CertificateDetails.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$x509cert of function openssl_x509_parse expects resource\\|string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateDetails.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$pieces of function implode expects array, array\\<int, string\\>\\|false given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateDetails.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$certificate of function openssl_pkey_get_public expects resource\\|string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateUtils.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$key of function openssl_pkey_get_details expects resource, resource\\|false given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateUtils.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$x509 of function openssl_x509_export expects resource\\|string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateUtils.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$x509 of function openssl_x509_fingerprint expects resource\\|string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateUtils.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$x509cert of function openssl_x509_parse expects resource\\|string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateUtils.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$str of function explode expects string, string\\|false given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateUtils.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$a of function gmp_add expects GMP\\|int\\|string, GMP\\|null given\\.$#" | ||
count: 1 | ||
path: library/X509/Job.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$a of function gmp_and expects GMP\\|int\\|string, GMP\\|null given\\.$#" | ||
count: 1 | ||
path: library/X509/Job.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$input of function str_pad expects string, string\\|false given\\.$#" | ||
count: 1 | ||
path: library/X509/Job.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$str of function base64_encode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/Model/Behavior/DERBase64.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$str of function explode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/Model/Behavior/DERBase64.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$in_addr of function inet_ntop expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/Model/Behavior/Ip.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$input of function str_pad expects string, string\\|false given\\.$#" | ||
count: 1 | ||
path: library/X509/Model/Behavior/Ip.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$ip_address of function inet_pton expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/Model/Behavior/Ip.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$str of function ltrim expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/Model/Behavior/Ip.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Parameter \\#1 \\$certificate of function openssl_x509_read expects OpenSSLCertificate\\|string, mixed given\\.$#" | ||
count: 1 | ||
path: application/clicommands/ImportCommand.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$certificate of function openssl_x509_parse expects OpenSSLCertificate\\|string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateDetails.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function bin2hex expects string, mixed given\\.$#" | ||
count: 2 | ||
path: library/X509/CertificateDetails.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$array of function implode expects array\\|null, array\\<int, string\\>\\|false given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateDetails.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$certificate of function openssl_x509_export expects OpenSSLCertificate\\|string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateUtils.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$certificate of function openssl_x509_fingerprint expects OpenSSLCertificate\\|string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateUtils.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$certificate of function openssl_x509_parse expects OpenSSLCertificate\\|string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateUtils.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$key of function openssl_pkey_get_details expects OpenSSLAsymmetricKey, OpenSSLAsymmetricKey\\|false given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateUtils.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$public_key of function openssl_pkey_get_public expects array\\|OpenSSLAsymmetricKey\\|OpenSSLCertificate\\|string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateUtils.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$string of function explode expects string, string\\|false given\\.$#" | ||
count: 1 | ||
path: library/X509/CertificateUtils.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$num1 of function gmp_add expects GMP\\|int\\|string, GMP\\|null given\\.$#" | ||
count: 1 | ||
path: library/X509/Job.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$num1 of function gmp_and expects GMP\\|int\\|string, GMP\\|null given\\.$#" | ||
count: 1 | ||
path: library/X509/Job.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function str_pad expects string, string\\|false given\\.$#" | ||
count: 1 | ||
path: library/X509/Job.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function base64_encode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/Model/Behavior/DERBase64.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/Model/Behavior/DERBase64.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$ip of function inet_ntop expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/Model/Behavior/Ip.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$ip of function inet_pton expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/Model/Behavior/Ip.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function ltrim expects string, mixed given\\.$#" | ||
count: 1 | ||
path: library/X509/Model/Behavior/Ip.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function str_pad expects string, string\\|false given\\.$#" | ||
count: 1 | ||
path: library/X509/Model/Behavior/Ip.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
$includes = []; | ||
if (PHP_VERSION_ID >= 80000) { | ||
$includes[] = __DIR__ . '/phpstan-baseline-8x.neon'; | ||
} else { | ||
$includes[] = __DIR__ . '/phpstan-baseline-7x.neon'; | ||
} | ||
|
||
return ['includes' => $includes]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.