mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Allow GMP to be converted to string
This commit is contained in:
parent
3718bd5c61
commit
c39af03a01
@ -3348,6 +3348,7 @@ return [
|
||||
'gmmktime' => ['int', 'hour='=>'int', 'min='=>'int', 'sec='=>'int', 'mon='=>'int', 'day='=>'int', 'year='=>'int'],
|
||||
'GMP::__construct' => ['void'],
|
||||
'GMP::serialize' => ['string'],
|
||||
'GMP::__toString' => ['string'],
|
||||
'GMP::unserialize' => ['void', 'serialized'=>'string'],
|
||||
'gmp_abs' => ['GMP', 'a'=>'GMP|string|int'],
|
||||
'gmp_add' => ['GMP', 'a'=>'GMP|string|int', 'b'=>'GMP|string|int'],
|
||||
|
@ -66,7 +66,8 @@ class BinaryOperationTest extends TestCase
|
||||
$a = gmp_init(2);
|
||||
$b = gmp_init(4);
|
||||
$c = $a + $b;
|
||||
$d = $c + 3;',
|
||||
$d = $c + 3;
|
||||
echo $d;',
|
||||
'assertions' => [
|
||||
'$a' => 'GMP',
|
||||
'$b' => 'GMP',
|
||||
|
Loading…
x
Reference in New Issue
Block a user