1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00
This commit is contained in:
orklah 2021-07-23 21:22:00 +02:00
parent c8ee73ce30
commit c225281d22

View File

@ -662,6 +662,18 @@ class BinaryOperationTest extends TestCase
return "Hello $s1 $s2";
}',
],
'NumericStringIncrement' => [
'<?php
function scope(array $a): int|float {
$offset = array_search("foo", $a);
if(is_numeric($offset)){
return $offset++;
}
else{
return 0;
}
}',
],
];
}