Welcome Guest, Not a member yet? Register   Sign In
PHPStorm yellow "Method not found in" notices
#4

(04-14-2020, 04:43 AM)Leo Wrote: The codeigniter plugin didn't help. I figured it out after digging the internet for a while - heres to any other newb, like me, looking.
PHP Code:
<?php namespace App\Controllers;

use 
App\Models\MediaModel;

class 
Media extends BaseController
{
    /* @var $model MediaModel */
    protected $model;

    public function doSomething()
    {
        $this->model = new MediaModel();
        $this->model->setTable('table');
        $stuff $this->doSomethingElse();
    }
    
    
private function doSomethingElse()
    {
        return $this->model->findAll(); //NO MORE TEARS! PHPSTORM FINDS THE METHOD
    }



So basically do this:
/* @var $model MediaModel */
protected $model;

The plugin supports Codeigniter 3. For CodeIgniter 4 you can use this method:
Copy the attached file to the app folder: this should enable automatic completion in PhpStorm
The file is an experiment and is not complete.
I hope it is useful.

Attached Files
.php   phpstorm.php (Size: 68.27 KB / Downloads: 26)
Codeigniter 4 - Docker Image [github] [docker hub]
Reply


Messages In This Thread
RE: PHPStorm yellow "Method not found in" notices - by atsanna - 04-14-2020, 06:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB