mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Merge pull request #7159 from AndrolGenhald/bugfix/number-format-optional-arguments
Fix optional arguments in number_format (fixes #7158).
This commit is contained in:
commit
41fe5534b6
@ -9025,8 +9025,7 @@ return [
|
||||
'nsapi_response_headers' => ['array'],
|
||||
'nsapi_virtual' => ['bool', 'uri'=>'string'],
|
||||
'nthmac' => ['string', 'clent'=>'string', 'data'=>'string'],
|
||||
'number_format' => ['string', 'num'=>'float|int', 'decimals='=>'int'],
|
||||
'number_format\'1' => ['string', 'num'=>'float|int', 'decimals'=>'int', 'decimal_separator'=>'string', 'thousands_separator'=>'string'],
|
||||
'number_format' => ['string', 'num'=>'float|int', 'decimals='=>'int', 'decimal_separator='=>'string', 'thousands_separator='=>'string'],
|
||||
'NumberFormatter::__construct' => ['void', 'locale'=>'string', 'style'=>'int', 'pattern='=>'string'],
|
||||
'NumberFormatter::create' => ['NumberFormatter|false', 'locale'=>'string', 'style'=>'int', 'pattern='=>'string'],
|
||||
'NumberFormatter::format' => ['string|false', 'num'=>'', 'type='=>'int'],
|
||||
|
@ -949,6 +949,10 @@ return [
|
||||
'old' => ['bool', 'mysql'=>'mysqli', 'flags='=>'int', 'name='=>'string'],
|
||||
'new' => ['bool', 'mysql'=>'mysqli', 'flags='=>'int', 'name='=>'?string'],
|
||||
],
|
||||
'number_format' => [
|
||||
'old' => ['string', 'num'=>'float|int', 'decimals='=>'int'],
|
||||
'new' => ['string', 'num'=>'float|int', 'decimals='=>'int', 'decimal_separator='=>'string', 'thousands_separator='=>'string'],
|
||||
],
|
||||
'openssl_csr_export' => [
|
||||
'old' => ['bool', 'csr'=>'string|resource', '&w_output'=>'string', 'no_text='=>'bool'],
|
||||
'new' => ['bool', 'csr'=>'OpenSSLCertificateSigningRequest|string', '&w_output'=>'OpenSSLAsymmetricKey', 'no_text='=>'bool'],
|
||||
@ -1591,6 +1595,7 @@ return [
|
||||
'image2wbmp' => ['bool', 'im'=>'resource', 'filename='=>'?string', 'threshold='=>'int'],
|
||||
'jpeg2wbmp' => ['bool', 'jpegname'=>'string', 'wbmpname'=>'string', 'dest_height'=>'int', 'dest_width'=>'int', 'threshold'=>'int'],
|
||||
'ldap_sort' => ['bool', 'link_identifier'=>'resource', 'result_identifier'=>'resource', 'sortfilter'=>'string'],
|
||||
'number_format\'1' => ['string', 'num'=>'float|int', 'decimals'=>'int', 'decimal_separator'=>'string', 'thousands_separator'=>'string'],
|
||||
'png2wbmp' => ['bool', 'pngname'=>'string', 'wbmpname'=>'string', 'dest_height'=>'int', 'dest_width'=>'int', 'threshold'=>'int'],
|
||||
'read_exif_data' => ['array', 'filename'=>'string', 'sections_needed='=>'string', 'sub_arrays='=>'bool', 'read_thumbnail='=>'bool'],
|
||||
'SimpleXMLIterator::rewind' => ['void'],
|
||||
|
@ -1763,6 +1763,14 @@ class FunctionCallTest extends TestCase
|
||||
[],
|
||||
'8.1',
|
||||
],
|
||||
'number_formatNamedArgument' => [
|
||||
'<?php
|
||||
echo number_format(10.363, 1, thousands_separator: " ");
|
||||
',
|
||||
[],
|
||||
[],
|
||||
'8.0',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user