you can use @method
phpdoc tag to get autocomplete for magic methods
here is a code example for you:
<?php
/**
* Class Controller
* @method mixed foo() foo($parametersHere) explanation of the function
*/
Class Controller {
public function __call($function, $arguments) {
if($function == 'foo') {
// some logic here
}
}
}
This should work well