![]() |
PHPStorm yellow "Method not found in" notices - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: PHPStorm yellow "Method not found in" notices (/showthread.php?tid=76084) |
PHPStorm yellow "Method not found in" notices - Leo - 04-13-2020 Does anyone use PHPStorm? How do I fix the annoying method not found warnings\errors when using singleton instance of class across functions in controller? PHP Code: <?php namespace App\Controllers; RE: PHPStorm yellow "Method not found in" notices - cyberstunts - 04-13-2020 I don't have the solution but can suggest clicking on the small "man in the hat" icon at the bottom right. There you can configure code inspection. I do have plugin installed "CodeIgniter" by Martynas Sateika. (Press CTRL+ALT+S > Plugins). Don't have resolution problems, and didn't have to configure them. Also in settings you could go to "Languages & Frameowrks > PHP > CodeIgniter" and tick checkbox "Enable CodeIgniter Integration". RE: PHPStorm yellow "Method not found in" notices - Leo - 04-14-2020 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; So basically do this: /* @var $model MediaModel */ protected $model; RE: PHPStorm yellow "Method not found in" notices - atsanna - 04-14-2020 (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. 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. |