peppeocchi / php-cron-scheduler

PHP cron job scheduler
MIT License
808 stars 143 forks source link

Intelephense suggestion issue #122

Open ekr3peeK opened 3 years ago

ekr3peeK commented 3 years ago

Intelephense for VS Code, gets only partial suggestions when you are trying to use the following syntax:

$scheduler->php(...)
                ->everyMinute(...)
                ->when(...)

According to Intelephense the when function does not exist, because the everyMinute function which is in the trait is being documented as returning itself, and not the actual class where the trait was used:

     * @return self
     */
    public function everyMinute($minute = null)

This could be fixed if updating the @return documentation of the traits function to static, instead of self.

As I am using VS Code, I could not test this out, if the intelisens used by other IDEs behave the same on this issue, or not.