Jump to content

Archived

This topic is now archived and is closed to further replies.

bbalet

Hello world

Recommended Posts

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

Share this post


Link to post
Share on other sites

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) ;)

Share this post


Link to post
Share on other sites

Hi,

 

Thank you for the feedback. I'll review the model and try to make them smaller.

 

Benjamin

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.