mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Add IssetTest
This commit is contained in:
parent
9bbe437f22
commit
033bf3db16
@ -2753,7 +2753,7 @@ return [
|
||||
'fgetss' => ['string|false', 'fp'=>'resource', 'length='=>'int', 'allowable_tags='=>'string'],
|
||||
'file' => ['array<int,string>|false', 'filename'=>'string', 'flags='=>'int', 'context='=>'resource'],
|
||||
'file_exists' => ['bool', 'filename'=>'string'],
|
||||
'file_get_contents' => ['string|false', 'filename'=>'string', 'use_include_path='=>'bool', 'context='=>'resource', 'offset='=>'int', 'maxlen='=>'int'],
|
||||
'file_get_contents' => ['string|false', 'filename'=>'string', 'use_include_path='=>'bool', 'context='=>'?resource', 'offset='=>'int', 'maxlen='=>'int'],
|
||||
'file_put_contents' => ['int|false', 'file'=>'string', 'data'=>'mixed', 'flags='=>'int', 'context='=>'resource'],
|
||||
'fileatime' => ['int|false', 'filename'=>'string'],
|
||||
'filectime' => ['int|false', 'filename'=>'string'],
|
||||
|
@ -355,6 +355,16 @@ class IssetTest extends TestCase
|
||||
}
|
||||
}'
|
||||
],
|
||||
'issetVarInLoopBeforeAssignment' => [
|
||||
'<?php
|
||||
function foo() : void {
|
||||
while (rand(0, 1)) {
|
||||
if (!isset($foo)) {
|
||||
$foo = 1;
|
||||
}
|
||||
}
|
||||
}',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user