kalessil / phpinspectionsea

A Static Code Analyzer for PHP (a PhpStorm/Idea Plugin)
https://plugins.jetbrains.com/plugin/7622?pr=phpStorm
Other
1.43k stars 119 forks source link

Don't suggest Laravel Pest tests to be static functions #1812

Open tanthammar opened 2 years ago

tanthammar commented 2 years ago

Description (screenshot): image

Would be great if this plugin could be more compatible with Laravel Pest. The function example cannot be static...

https://pestphp.com/docs/plugins/livewire

AlexandreGerault commented 4 months ago

Yes, indeed the Pest function cannot be static since they internally rely on an actual class instance. Maybe you can get rid of these warning with a $this used in the test but this look bad in my opinion to have $this on such tests (not really logic to see $this on a code we didn't explicitly tell it was a class).

Any news about the fact this would be considered or not? 😄

EDIT: I guess it has to deal with this file