natanfelles / codeigniter-phpstorm

PhpStorm Code Completion for CodeIgniter 3
https://natanfelles.github.io/blog/codeigniter-code-completion-phpstorm.html
204 stars 101 forks source link

Auto completion doesn't work in migration files #10

Closed joel-depiltech closed 7 years ago

joel-depiltech commented 7 years ago

Hello, Thanks for your sharing. Your work make my life easier. When I code in a migration file file (application/migrations/XXX_my_migration.php) I cannot auto complete, do you have an idea why this do not works ? Thanks

Regards from Nice, France (so sorry for my english)

natanfelles commented 7 years ago

Hello, Joel.

I add a doc block inside my migration methods like it:

    public function down()
    {
        /**
         * @var CI_Controller $this
         */
        $this->dbforge->drop_table($this->table);
    }

Then is possible to use code-completion with $this->.

I have not yet found a more elegant solution, but it works.

joel-depiltech commented 7 years ago

Many thanks @natanfelles ! It works well