In PHPStorm, I was able to get autocomplete working with Codeigniter by adding a file to config / autocomplete.php that contains the properties. PhpStorm can read this file and let me quickly jump to functions and have autocomplete capabilities. In autocomplete.php I can have @property Account_model $Account_model, and then whenever I use $this->Account_model->xxx, autocomplete works.
When used, get_instance()all this functionality dies. For example, when in a helper class I have to use $CI = & get_instance();, and then $CI->Account_model->xxxx. How do you get auto-complete to work when accessing the library this way?
[Note: this is a simple example. My true use is with PHPUnit, but solving the above example will allow PHPUnit to work as well.]
source
share