thecodingmachine / safe

All PHP functions, rewritten to throw exceptions instead of returning false
MIT License
2.35k stars 140 forks source link

getopt() return type annotation does not exist #426

Open jack-worman opened 11 months ago

jack-worman commented 11 months ago

The code is:

/**
 * @return \__benevolent This function will return an array of option / argument pairs.
 */
function getopt(string $short_options, array $long_options = [], ?int &$rest_index = null): array

\__benevolent is wrong and causes static analyzers to error out.