Wrong phpdoc param type for function hasPermission()
lucasjose501 opened this issue · 1 comments
lucasjose501 commented
I'm using Larastan (PHP Stan) to scan the code for bugs and typos. The function hasPermission($permission, $team = null, $requireAll = false)
accepts int in the $team variable handled by the helper 'getIdFor' but the phpdoc does not mention it and reports as error on phpstan.
Error: Parameter #2 $team of method App\Models\User::hasPermission() expects bool|string|null, int given.
The code is working, it's just a false positive report.
laratrust/src/Traits/LaratrustUserTrait.php
Line 227 in 8a18c70
filippotoso commented
Will be fixed in the next release.