You are viewing a single comment's thread from:

RE: Projects API implementation into the PHP Client for Makerlog

in #utopian-io5 years ago

Thank you for your contribution.

Your isPrivate (and also isPublic method seems a code smell to me because it has a general-exception-catcher.. This method should be as simple as ->private and if there is exception e.g. getProjectData() is null, then let the exception be thrown and get caught earlier.. See this post for more details.

Your isPublic() could be just return !this->isPrivate() which removes the code duplication.

Code duplication for example, the Project and Product both have same implementation of refresh() could this be moved to a parent class?

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Sort:  

Thank you for your review, @justyy! Keep up the good work!