Skip to content

Commit

Permalink
change signatures for openssl_sign to Adapt to php8+ for PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhangqi Chen committed Apr 17, 2023
1 parent 3a6e43b commit 11ade70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions generator/config/CustomPhpStanFunctionMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
'openssl_pkey_get_details' => ['array|false', 'key'=>'OpenSSLAsymmetricKey'],
'openssl_pkey_get_private' => ['OpenSSLAsymmetricKey|false', 'private_key'=>'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string', 'passphrase='=>'null|string'],
'openssl_pkey_get_public' => ['OpenSSLAsymmetricKey|false', 'public_key'=>'OpenSSLAsymmetricKey|OpenSSLCertificate|array|string'],
'openssl_sign' => ['void', 'data'=>'string', '&signature'=>'string|null', 'private_key'=>'OpenSSLAsymmetricKey|resource|string', 'algorithm'=>'int|string'],
// theses replace ressource by OpenSSLCertificate
'openssl_verify' => ['-1|0|1|false', 'data'=>'string', 'signature'=>'string', 'pub_key_id'=>' OpenSSLAsymmetricKey|OpenSSLCertificate|string', 'signature_alg='=>'int|string'],
'openssl_x509_read' => ['OpenSSLCertificate|false', 'x509certdata'=>'OpenSSLCertificate|string'], // this replaces ressource by OpenSSLCertificate
Expand Down
4 changes: 2 additions & 2 deletions generator/tests/DocPageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ public function testDetectFalsyFunction()
$this->assertTrue($pregMatch->detectFalsyFunction());
$this->assertFalse($implode->detectFalsyFunction());
$this->assertTrue($getCwd->detectFalsyFunction());
$this->assertTrue($setTime->detectFalsyFunction());
$this->assertFalse($setTime->detectFalsyFunction());
$this->assertTrue($filesize->detectFalsyFunction());
$this->assertTrue($mcryptDecrypt->detectFalsyFunction());
$this->assertTrue($fsockopen->detectFalsyFunction());
$this->assertFalse($arrayReplace->detectFalsyFunction());
$this->assertTrue($date->detectFalsyFunction());
$this->assertFalse($date->detectFalsyFunction());
$this->assertTrue($classImplement->detectFalsyFunction());
$this->assertTrue($getHeaders->detectFalsyFunction());
$this->assertTrue($gzopen->detectFalsyFunction());
Expand Down

0 comments on commit 11ade70

Please sign in to comment.