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

[4.5] refactor: use local variables in Model #8565

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Feb 21, 2024

Description
To fix PHPStan error. Also, using a local variable is a bit faster than method calling twice.

  ------ -------------------------------------------- 
  Line   system/Model.php                            
 ------ -------------------------------------------- 
  211    Variable $returnType might not be defined.  
  213    Variable $returnType might not be defined.  
  275    Variable $returnType might not be defined.  
  278    Variable $returnType might not be defined.  
  316    Variable $returnType might not be defined.  
  318    Variable $returnType might not be defined.  
 ------ -------------------------------------------- 

https://github.com/codeigniter4/CodeIgniter4/actions/runs/7982852609/job/21797025530

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

To fix PHPStan errors, and using a local variable is a bit faster
than method calling.
@kenjis kenjis added refactor Pull requests that refactor code 4.5 labels Feb 21, 2024
@kenjis kenjis merged commit 650fd1f into codeigniter4:4.5 Feb 22, 2024
46 checks passed
@kenjis kenjis deleted the refactor-Model-useCasts branch February 22, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.5 refactor Pull requests that refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants