mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
add test
This commit is contained in:
parent
c8ee73ce30
commit
c225281d22
@ -662,6 +662,18 @@ class BinaryOperationTest extends TestCase
|
|||||||
return "Hello $s1 $s2";
|
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;
|
||||||
|
}
|
||||||
|
}',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user