PHPStorm yellow "Method not found in" notices |
04-13-2020, 01:14 PM
(This post was last modified: 04-13-2020, 01:18 PM by Leo. Edit Reason: clarity )
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;
You can see things I made with codeigniter here: itart.pro its not overly impressive as I have very little time to learn.
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".
04-14-2020, 04:43 AM
(This post was last modified: 04-14-2020, 05:26 AM by Leo. Edit Reason: clarity )
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;
You can see things I made with codeigniter here: itart.pro its not overly impressive as I have very little time to learn.
(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. Codeigniter 4 - Docker Image [github] [docker hub]
|
Welcome Guest, Not a member yet? Register Sign In |