Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
setVerbosityThreshold() breaks code completion #857
Steps to reproduce
Create a command like:
Code completion (specifically in PhpStorm, but probably any IDE) should work on each of the methods on the command stack. For instance, as I start typing "ru", it should suggest "run()", and if I inspect it should take me to the method declaration.
Code completion fails on the method immediately following setVerbosityThreshold(). In this case it's run(), but if you reordered it to have dir() after setVerbosityThreshold() then dir() would fail code completion but run() would work.
Something about the return value for setVerbosityThreshold() causes PhpStorm to fail to find the definition of the subsequent method.
Ubuntu 19.04, PHP 7.2
My guess is that this has something to do with the (lack of?) doc comments on setVerbosityThreshold. Adding this to VerbosityThresholdInterface::setVerbosityThreshold() fixes it but I'm pretty sure it's a hack. I'm not familiar enough with Robo internals to make it better but I'm happy to take a crack if you point me in the right direction.