-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add support for user custom attributes #46
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
=========================================
Coverage 99.55% 99.56%
- Complexity 478 481 +3
=========================================
Files 135 135
Lines 908 913 +5
=========================================
+ Hits 904 909 +5
Misses 4 4
☔ View full report in Codecov by Sentry. |
2908d55
to
d974402
Compare
d974402
to
de0b663
Compare
@@ -67,6 +67,8 @@ class UserAttributes extends BaseObject | |||
|
|||
public ?string $twitter = null; | |||
|
|||
private array $_customAttributes = []; |
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 dislike using "$_*" to figure out that the variable is private.
my2cent
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 used this notation to distinguish it from the real properties of the UserAttributes object expected by Braze. However, being a private detail, we can choose to rename it in the future as well.
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.
AWESOME! LGTM! 👍
🚨 Proposed changes
Add methods in the
UserAttributes
class to set custom attributes without using dynamic properties.Close #42
⚙️ Types of changes
What types of changes does your code introduce? Put an
x
in the boxes that apply