Skip to content

Commit d93de33

Browse files
committed
fix: silence Psalm for the Windows-only sapi_windows_set_ctrl_handler()
1 parent 47f3ec2 commit d93de33

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎system/CLI/SignalTrait.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ protected function isWindowsCtrlHandlerAvailable(): bool
121121
*/
122122
protected function setWindowsCtrlHandler(callable $handler, bool $add): bool
123123
{
124-
return sapi_windows_set_ctrl_handler($handler, $add);
124+
// Static analysis on other platforms does not know the function.
125+
/** @psalm-suppress UndefinedFunction */
126+
return sapi_windows_set_ctrl_handler($handler, $add); // @codeCoverageIgnore
125127
}
126128

127129
/**

0 commit comments

Comments
 (0)