Skip to content

docs: Add @method for when() and whenNot() in models. #7836

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

Merged
merged 4 commits into from
Aug 21, 2023

Conversation

sammyskills
Copy link
Contributor

@sammyskills sammyskills commented Aug 17, 2023

Description
The when() and whenNot() conditional statements works directly with models, i.e., one does not need to call the builder() method before using it. So, they should be type-hinted in IDEs or code editors, just like others.
See https://forum.codeigniter.com/showthread.php?tid=88190&pid=411611#pid411611

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

@kenjis kenjis changed the title feat: Add typehint support for when() and whenNot() in models. docs: Add @method for when() and whenNot() in models. Aug 18, 2023
@sammyskills sammyskills requested a review from kenjis August 18, 2023 11:22
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.

Looks good! Rector failure is a mistake - rerunning.

@kenjis kenjis merged commit 37ee50f into codeigniter4:develop Aug 21, 2023
@kenjis
Copy link
Member

kenjis commented Aug 21, 2023

@sammyskills Thank you.

We recommend git rebase instead of git merge to update PR branches.
I hope you will be able to use it.
See codeigniter4/shield#789 (comment)

@sammyskills sammyskills deleted the when-whennot-typehint branch August 21, 2023 03: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.

4 participants