codeigniter-phpstorm icon indicating copy to clipboard operation
codeigniter-phpstorm copied to clipboard

I get extra (unnecessary) results when, model.php and controller.php are marked as plain text

Open glorsh66 opened this issue 7 years ago • 4 comments

It's quite simple -when i use my own models and libraries i get extra autocomplete options that makes findings a needed opinion more difficult, and it just unnecessary garbage.

It is without making model.php and controller.php are marked as plain text (i got only what i need) image

It is when they are marked as a plain text file (i get a lot of garbage results) image

Is there a way to improve it? Of course without marking model.php and controller.php as plain text standard models doesn't work properly (such as DB and so son)

glorsh66 avatar May 03 '18 13:05 glorsh66

While the "default" properties are unnecessary in your use case, this properties can be accessed by your model, like:

$this->PModel->input->get('foo');

It occurs because this properties exists in the CI_Model, (well, we are simulating this existence with the phpstorm.php...). So, when you extends CI_Model this properties appears.

The PhpStorm IDE show the direct child class methods and properties with a bold text, I think that it is the way. And the methods with red background.

I think is not possible to ignore the properties, because this is there. And this must be showed.

natanfelles avatar May 03 '18 17:05 natanfelles

Do you know is it possible to sort autocomplete results in phpstoms?

glorsh66 avatar May 09 '18 10:05 glorsh66

I'm not sure. But I know that is possible to configure it to show the autocompletion lexicographically.

For example, you type $this->md and the panel will show properties/methods with priority for words containing md, like foo_model could go to the panel top.

natanfelles avatar May 09 '18 12:05 natanfelles

https://www.jetbrains.com/help/phpstorm/settings-code-completion.html

natanfelles avatar May 09 '18 12:05 natanfelles