Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve model() auto-completion #5186

Merged
merged 1 commit into from Oct 9, 2021

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Oct 8, 2021

Description

  • improve model() auto-completion for PhpStorm

Screenshot 2021-10-08 8 59 19

@phpstan-return is to suppress the following PHPStan error. I don't know why the error occurs.

 ------ -------------------------------------------------------------------------------------- 
  Line   system/Common.php                                                                     
 ------ -------------------------------------------------------------------------------------- 
  787    Function model() should return T of CodeIgniter\Model but returns CodeIgniter\Model.  
 ------ -------------------------------------------------------------------------------------- 

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • [] Unit testing, with >80% coverage
  • [] User guide updated
  • Conforms to style guide

@kenjis kenjis changed the title docs: add Generics annotation to model() Improve model() auto-completion Oct 8, 2021
@phpstan-return is to suppress PHPStan error.
@kenjis kenjis force-pushed the improve-model-autocompletion branch from d9ecee9 to 60e559e Compare October 8, 2021 00:46
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't used docblock templates before but I trust these changes.

@kenjis kenjis merged commit 817c099 into codeigniter4:develop Oct 9, 2021
@kenjis kenjis deleted the improve-model-autocompletion branch October 9, 2021 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants