-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
phpstan/phpstan-src
#1487Labels
Milestone
Description
Bug report
I have the following stub file
<?php
/**
* We can consider that this method will never throw an exception
*
* @throws void
*/
function random_int(int $min, int $max): int {}
And I added my php.stub file to the stubFiles section of my phpstan.neon.
I also use missingCheckedExceptionInThrows.
Expected output
When I use random_int I would expect no error from phpstan but I get
... throws checked exception Exception but it's missing from the PHPDoc @throws tag
Am I doing something wrong or would it be possible that the throws void is not correctly handled in a stub file for native functions.
Did PHPStan help you today? Did it make you happy in any way?
Sure, trying to integrate the exceptions checks.