1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 16:59:45 +01:00
psalm/tests/fixtures/stubs/polyfill.php

25 lines
381 B
PHP
Raw Normal View History

<?php
2019-03-23 19:27:54 +01:00
if (!function_exists('random_bytes')) {
/**
* @param int $bytes
2019-03-23 19:27:54 +01:00
*
* @return void
*/
function random_bytes($bytes)
{
2019-03-23 19:27:54 +01:00
throw new \Exception('bad');
}
}
2019-03-23 19:27:54 +01:00
if (!function_exists('new_random_bytes')) {
/**
* @param int $bytes
2019-03-23 19:27:54 +01:00
*
* @return int
*/
function new_random_bytes($bytes)
{
return 5;
}
}