pestphp / pest

Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
https://pestphp.com
MIT License
9.42k stars 338 forks source link

Documentation / Guide: Code completion #84

Closed alexmartinfr closed 4 years ago

alexmartinfr commented 4 years ago

From https://github.com/pestphp/pest/issues/33:

2. Code completion I love me some code completion and I expected that this would be an issue when moving from classes to closures.

So when using $this without any kind of hinting you will not get code completion and for some they don't need it which is great!

I ended up using the @var to type hint this for me.

/** @var FeatureTestCase $this */`

But I understand that to a lot of people this is a bit over the top. So because of this I will probably endup putting any traits in the parent TestCase if I have created one for further completion rather than using the uses(TestCase::class, //...traits).

TODO:

alexmartinfr commented 4 years ago

This should not be an issue anymore with Pest 0.2.0.

nunomaduro commented 4 years ago

And fixed here: https://github.com/pestphp/pest-intellij/releases.