Skip to content

Commit 827fcdf

Browse files
committed
added system() param-out
1 parent c6ee285 commit 827fcdf

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

stubs/core.stub

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ function similar_text(string $string1, string $string2, float &$percent = null)
8686
*/
8787
function exec(string $command, &$output, &$result_code): string|false {}
8888

89+
/** @param-out int $result_code */
90+
function system(string $command, &$result_code): string|false {}
8991

9092
/**
9193
* @template T

tests/PHPStan/Analyser/data/param-out.php

+6
Original file line numberDiff line numberDiff line change
@@ -333,3 +333,9 @@ function fooExec() {
333333
assertType('list<string>', $output);
334334
assertType('int', $exitCode);
335335
}
336+
337+
function fooSystem() {
338+
system("my cmd", $exitCode);
339+
340+
assertType('int', $exitCode);
341+
}

0 commit comments

Comments
 (0)