bbalet Posted May 22, 2014 Share Posted May 22, 2014 (edited) Hi, I am learning PHP and appreciate to share knowledge with other people. I am developing a leave management system for a non-profit organization and I've released the source code : https://github.com/bbalet/lms Any feedback is appreciated See you Edited May 22, 2014 by bbalet Quote Link to comment https://forums.phpfreaks.com/topic/288685-hello-world/ Share on other sites More sharing options...
mogosselin Posted May 23, 2014 Share Posted May 23, 2014 (edited) Hi bbalet! Seems to me that you know what you're doing! I looked at the code a bit and the only thing I could say is that some methods are really long. For example, this one : https://github.com/bbalet/lms/blob/master/application/models/leaves_model.php / get_user_leaves_summary The first step to break it up would be to make a new method where you put a comment. For example, where you put the comment "//Fill a list of all existing leave types", you could have a method named "fillList()" and another one "getLeavesExistingTypes()" or something like that. Dunno if it make sense there but you know what I mean. Remember, the first rule is that methods should be small. The second rule is that methods should be smaller than that (from the book Clean Code) Edited May 23, 2014 by mogosselin Quote Link to comment https://forums.phpfreaks.com/topic/288685-hello-world/#findComment-1480554 Share on other sites More sharing options...
bbalet Posted May 23, 2014 Author Share Posted May 23, 2014 Hi, Thank you for the feedback. I'll review the model and try to make them smaller. Benjamin Quote Link to comment https://forums.phpfreaks.com/topic/288685-hello-world/#findComment-1480604 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.