Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5938b84

Browse files
committedOct 3, 2024·
Adding openssl_sign() stub so PHPStan will correctly deduce $signature variable type which is now shown as mixed instead of string.
Fixes phpstan/phpstan#11791
1 parent 3cdac94 commit 5938b84

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

Diff for: ‎stubs/openssl.stub

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
/**
4+
* @param-out string $signature
5+
*/
6+
function openssl_sign(
7+
string $data,
8+
string &$signature,
9+
#[\SensitiveParameter] \OpenSSLAsymmetricKey|\OpenSSLCertificate|array|string $private_key,
10+
string|int $algorithm = OPENSSL_ALGO_SHA1
11+
): bool
12+
{
13+
}

0 commit comments

Comments
 (0)
Please sign in to comment.