-
Notifications
You must be signed in to change notification settings - Fork 519
Update and add missing function signatures #3701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4565,6 +4565,8 @@ | |||||
'imagecopyresampled' => ['bool', 'dst_im'=>'resource', 'src_im'=>'resource', 'dst_x'=>'int', 'dst_y'=>'int', 'src_x'=>'int', 'src_y'=>'int', 'dst_w'=>'int', 'dst_h'=>'int', 'src_w'=>'int', 'src_h'=>'int'], | ||||||
'imagecopyresized' => ['bool', 'dst_im'=>'resource', 'src_im'=>'resource', 'dst_x'=>'int', 'dst_y'=>'int', 'src_x'=>'int', 'src_y'=>'int', 'dst_w'=>'int', 'dst_h'=>'int', 'src_w'=>'int', 'src_h'=>'int'], | ||||||
'imagecreate' => ['__benevolent<resource|false>', 'x_size'=>'int<1, max>', 'y_size'=>'int<1, max>'], | ||||||
'imagecreatefromavif' => ['resource|false', 'filename'=>'string'], | ||||||
'imagecreatefromtga' => ['resource|false', 'filename'=>'string'], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was introduced only on PHP 7.4+ And this is already understood by phpstan |
||||||
'imagecreatefrombmp' => ['resource|false', 'filename'=>'string'], | ||||||
'imagecreatefromgd' => ['resource|false', 'filename'=>'string'], | ||||||
'imagecreatefromgd2' => ['resource|false', 'filename'=>'string'], | ||||||
|
@@ -8274,8 +8276,8 @@ | |||||
'odbc_pconnect' => ['resource', 'dsn'=>'string', 'user'=>'string', 'password'=>'string', 'cursor_option='=>'int'], | ||||||
'odbc_prepare' => ['resource|false', 'connection_id'=>'resource', 'query'=>'string'], | ||||||
'odbc_primarykeys' => ['resource', 'connection_id'=>'resource', 'qualifier'=>'string', 'owner'=>'string', 'table'=>'string'], | ||||||
'odbc_procedurecolumns' => ['resource', 'connection_id'=>'', 'qualifier'=>'string', 'owner'=>'string', 'proc'=>'string', 'column'=>'string'], | ||||||
'odbc_procedures' => ['resource', 'connection_id'=>'', 'qualifier'=>'string', 'owner'=>'string', 'name'=>'string'], | ||||||
'odbc_procedurecolumns' => ['resource|false', 'odbc'=>'resource', 'catalog'=>'string|null', 'schema'=>'string|null', 'procedure'=>'string|null', 'column'=>'string|null'], | ||||||
'odbc_procedures' => ['resource|false', 'odbc'=>'resource', 'catalog'=>'string|null', 'schema'=>'string|null', 'procedure'=>'string|null'], | ||||||
'odbc_result' => ['mixed', 'result_id'=>'resource', 'field'=>'mixed'], | ||||||
'odbc_result_all' => ['int|false', 'result_id'=>'resource', 'format='=>'string'], | ||||||
'odbc_rollback' => ['bool', 'connection_id'=>'resource'], | ||||||
|
@@ -8316,6 +8318,7 @@ | |||||
'opendir' => ['resource|false', 'path'=>'string', 'context='=>'resource'], | ||||||
'openlog' => ['bool', 'ident'=>'string', 'option'=>'int', 'facility'=>'int'], | ||||||
'openssl_cipher_iv_length' => ['int|false', 'method'=>'string'], | ||||||
'openssl_cipher_key_length' => ['int|false', 'cipher_algo'=>'string'], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was introduced only on PHP 8.2+ And this is understood by phpstan |
||||||
'openssl_csr_export' => ['bool', 'csr'=>'string|resource', '&w_out'=>'string', 'notext='=>'bool'], | ||||||
'openssl_csr_export_to_file' => ['bool', 'csr'=>'string|resource', 'outfilename'=>'string', 'notext='=>'bool'], | ||||||
'openssl_csr_get_public_key' => ['resource|false', 'csr'=>'string|resource', 'use_shortnames='=>'bool'], | ||||||
|
@@ -8797,7 +8800,7 @@ | |||||
'pg_lo_create' => ['int|false', 'connection='=>'resource', 'large_object_oid='=>''], | ||||||
'pg_lo_export' => ['bool', 'connection'=>'resource', 'oid'=>'int', 'filename'=>'string'], | ||||||
'pg_lo_export\'1' => ['bool', 'oid'=>'int', 'pathname'=>'string'], | ||||||
'pg_lo_import' => ['int|false', 'connection'=>'resource', 'pathname'=>'string', 'oid'=>''], | ||||||
'pg_lo_import' => ['int', 'connection'=>'resource', 'pathname'=>'string', 'object_id'=>'mixed'], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. false is valid The doc say
It should even be int|string|false |
||||||
'pg_lo_import\'1' => ['int', 'pathname'=>'string', 'oid'=>''], | ||||||
'pg_lo_open' => ['resource|false', 'connection'=>'resource', 'oid'=>'int', 'mode'=>'string'], | ||||||
'pg_lo_read' => ['string|false', 'large_object'=>'resource', 'len='=>'int'], | ||||||
|
@@ -10706,6 +10709,8 @@ | |||||
'sodium_bin2base64' => ['string', 'binary'=>'string', 'variant'=>'int'], | ||||||
'sodium_bin2hex' => ['string', 'binary'=>'string'], | ||||||
'sodium_compare' => ['int', 'string_1'=>'string', 'string_2'=>'string'], | ||||||
'sodium_crypto_aead_aegis128l_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Introduced in PHP8.4+ only And already understood |
||||||
'sodium_crypto_aead_aegis256_decrypt' => ['string|false', 'ciphertext'=>'string', 'additional_data'=>'string', 'nonce'=>'string', 'key'=>'string'], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Introduced in PHP 8.4+ And already understood |
||||||
'sodium_crypto_aead_aes256gcm_decrypt' => ['string|false', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'], | ||||||
'sodium_crypto_aead_aes256gcm_encrypt' => ['string', 'confidential_message'=>'string', 'public_message'=>'string', 'nonce'=>'string', 'key'=>'string'], | ||||||
'sodium_crypto_aead_aes256gcm_is_available' => ['bool'], | ||||||
|
@@ -11846,6 +11851,8 @@ | |||||
'ssh2_exec' => ['resource|false', 'session'=>'resource', 'command'=>'string', 'pty='=>'string', 'env='=>'array', 'width='=>'int', 'height='=>'int', 'width_height_type='=>'int'], | ||||||
'ssh2_fetch_stream' => ['resource|false', 'channel'=>'resource', 'streamid'=>'int'], | ||||||
'ssh2_fingerprint' => ['string|false', 'session'=>'resource', 'flags='=>'int'], | ||||||
'ssh2_forward_accept' => ['resource|false', 'listener'=>'resource'], | ||||||
'ssh2_forward_listen' => ['resource|false', 'session'=>'resource', 'port='=>'int', 'host'=>'string', 'connections'=>'int'], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
'ssh2_methods_negotiated' => ['array|false', 'session'=>'resource'], | ||||||
'ssh2_publickey_add' => ['bool', 'pkey'=>'resource', 'algoname'=>'string', 'blob'=>'string', 'overwrite='=>'bool', 'attributes='=>'array'], | ||||||
'ssh2_publickey_init' => ['resource|false', 'session'=>'resource'], | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was introduced only on PHP 8.1+
https://www.php.net/manual/en/function.imagecreatefromavif.php
And this is already understood by phpstan
https://phpstan.org/r/71e35147-854d-4225-8c18-9773f7f92489