Skip to content

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

Merged
kenjis merged 1 commit into
codeigniter4:4.5from
kenjis:refactor-Model-useCasts
Feb 22, 2024
Merged

[4.5] refactor: use local variables in Model#8565
kenjis merged 1 commit into
codeigniter4:4.5from
kenjis:refactor-Model-useCasts

Conversation

@kenjis

@kenjis kenjis commented Feb 21, 2024

Copy link
Copy Markdown
Member

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
@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

refactor Pull requests that refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants