bbalet Posted May 22, 2014 Share Posted May 22, 2014 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 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 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) 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 Link to comment https://forums.phpfreaks.com/topic/288685-hello-world/#findComment-1480604 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.