laravel-nestedset
laravel-nestedset copied to clipboard
PhpPDoc for magic methods
Thanks for the awesome thing!
I was building my app and found that there were no hints given by my IDE (PhpStrom), I was using descendantsAndSelf() method.
I've made workaround myself. I've put PhpDoc comments as a class comment.
/**
* @method static \Kalnoy\Nestedset\Collection descendantsAndSelf($id)
*/
My suggestion is to create CLI command (or something else) to generate comments for the class that uses this trait.
There is a thing like https://github.com/barryvdh/laravel-ide-helper that might be useful to see how they create PhpDocs for models and facades.
We can also ask people to put this part of comments to their above class comments, but that's just a workaround as I think