-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Codeigniter\Entity - Added $deep parameter in toArray and toRawArray #3495
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good. You missed one definition which is causing tests errors: tests/system/View/ParserTest.php:256
Get that fixed and see if anyone else has thoughts on the implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have only some small suggestions.
How about renaming the |
65f792a
to
4c2f574
Compare
@paulbalandan It makes sense to me using either of those names let's see what other think about it. |
4c2f574
to
0e38d6d
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe both names: $deep
and $recursive
are correct and I have no preferences so I will agree with @MGatner and @paulbalandan here.
…methods Additionally added : - Unit Tests - Return Type Declaration for Entity Getters to avoid IDE errors - Some Code Style Fixes
0e38d6d
to
d06a9b3
Compare
@michalsn regarding the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
Good point with adding this to our standard. Just sent a PR: codeigniter4/coding-standard#30
Description
Added boolean $deep parameter in toArray and toRawArray methods. This parameters allows casting inner custom and entity objects to array as well
Additionally added :
Checklist: