Jump to content

Hello world


bbalet

Recommended Posts

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

Archived

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

×
×
  • 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.