-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add comments, fix code on HasIterator and TypeClassification #26
Conversation
1.Added comments for each method, making the code more understandable and maintainable. 2.Corrected return types and method parameters, adding more checks and accuracy in data type handling. 3.Ensured that the toEnum() method properly checks the values to return the correct classification types (IncomeClassificationType or ExpenseClassificationType).
I cant understand what is wrong with the |
return empty($this->toArray()) || in_array($value, $this->toArray(), true); with this return empty($this->classifications); This bypasses the check for null classification type. Also, I don't understand the reason behind completely ditching the |
Oh yes!! Sorry, but I didn’t quite understand the class correctly. Your code is soooo large, and honestly, you've done a really great job. I restored the functions to their original state. I left the comments. |
Frankly, I wouldn't touch a code if I don't fully understand it 😃 On a second thought, it looks better accessing the classifications property directly via I know that you reverted the change, but is this something you would like to re-implement? |
**
For now, I'll leave it as it is until I fully understand your logic. If you still think we should make the change, that's okay. |
I could proceed to make the changes, if you'd prefer. |
Yes go on!!! |
1.Added comments for each method, making the code more understandable and maintainable.
2.Corrected return types and method parameters, adding more checks and accuracy in data type handling.
3.Ensured that the toEnum() method properly checks the values to return the correct classification types (IncomeClassificationType or ExpenseClassificationType).