PHPStorm Unused imports wrong for Laravel Models

PHP Storm inspector says this is an unused import, but as you can see in the pic below, it is being used. How do I fix this behavior?

 

0
1 comment

Hi there,

Your TransactionType class is in the same namespace as Tax class -- App (FQN: \App\TransactionType & \App\Tax). Such use line is redundant -- if you remove that "use App\Tax;" line the app will keep working.

Ideally that inspection should report "Unnecessary import" straight away instead of "Unused import" (it does say "is not necessary", but it's in details so not super clear/obvious on what that means).

AFAIK there is no option in PhpStorm to disable this for this specific case ATM. I believe there is a ticket for this, but I cannot find it right now.

0

Please sign in to leave a comment.