Hi
I might have a version of ADHD :)
I like to have tool to check code, and rules/standards to follow, but sometime you end up in a situation where different tools and rules conflicts.
I my code I this warning
"message": "Name '\\App\\Enums\\UserLevelEnum' can be simplified with 'UserLevelEnum'",
Which is correct, but if i simply this, then PHPStan complains :)
here is some of the code
/**
* @return array{
* id: 'string',
* email_verified_at: 'datetime',
* current_team_id: 'string',
* webhooks: 'array',
* trial_ends_at: 'datetime',
* user_level: 'App\Enums\UserLevelEnum',
* is_admin: 'bool',
* is_blocked: 'bool',
* settings: 'array'
* }
*/
protected function casts(): array
{
return [
'id' => 'string',
'email_verified_at' => 'datetime',
'current_team_id' => 'string',
'webhooks' => 'array',
'trial_ends_at' => 'datetime',
'user_level' => \App\Enums\UserLevelEnum::class,
if I do not have this * user_level: 'App\Enums\UserLevelEnum',
in the docblock, PHPStan complains that the user_level property is not of the correct type and if I simplify the \App\Enums\UserLevelEnum::class, PHPStan complain that the UserLevelEnum::class is not equal to \App\Enums\UserLevelEnum::class
I know this is a little tricky to explain, sp let me know if there is something that is not clear
thanks