Default values as enums cases
d8vjork opened this issue · 0 comments
d8vjork commented
Versions:
- ide-helper Version: 2.12.3
- Laravel Version: 10.19.0
- PHP Version: 8.2.8
Description:
In case we want to add a default value using an enum typed argument on a model query scope like so:
<?php
class MyModel extends Model
{
public function scopeHasAbility(Builder $query, Authenticatable $user, ?CrudAction $ability = CrudAction::Read)
{
// code here...
}
}
This will run fine in PHP 8+ but IDE helper models docblock generator command will complain with the following error:
Error comes from this line:
laravel-ide-helper/src/Console/ModelsCommand.php
Line 1103 in 0801d00
Steps To Reproduce:
- Add code from description
- Run
php artisan ide-helper:models -w