Welcome Guest, Not a member yet? Register   Sign In
Code completion suggestion
#1

Because CI uses dynamic class members for every loaded thing
PHP Code:
foreach (is_loaded() as $var => $class)
{
    
$this->$var =& load_class($class);


IDEA like PHPStorm have difficulty with code completion, and shows many many warnings, for stuff like "$this->db"

There is an open YouTrack feature request for over 6 years, which testifies how difficault it is to interperate what is and what is not a member of the classes CI_Controller and CI_Model.

The current fix people that use PHPStorm are using, is this. A code completion helper, that adds "properties" to above classes, and makes life coding with CI much more pleasant.

Now, I know it is not technically correct to add those as properties, because they are extremely dynamic, but I think that the CC helpers adds the essentials, that are by default loaded, so I think adding those to the core codebase would be helping, even though not fully correct.


What do you think?
Do you have a better solution for the given problem?
Reply


Messages In This Thread
Code completion suggestion - by AmitMY - 11-22-2016, 05:01 AM
RE: Code completion suggestion - by Narf - 11-22-2016, 06:16 AM
RE: Code completion suggestion - by AmitMY - 11-22-2016, 06:48 AM
RE: Code completion suggestion - by Narf - 11-23-2016, 05:53 AM
RE: Code completion suggestion - by InsiteFX - 11-22-2016, 07:17 AM
RE: Code completion suggestion - by AmitMY - 11-22-2016, 07:29 AM
RE: Code completion suggestion - by InsiteFX - 11-22-2016, 09:21 AM
RE: Code completion suggestion - by cartalot - 11-22-2016, 11:43 AM
RE: Code completion suggestion - by AmitMY - 11-23-2016, 04:25 AM
RE: Code completion suggestion - by sneakyimp - 11-30-2016, 03:37 PM
RE: Code completion suggestion - by Narf - 12-01-2016, 04:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB