Good Day All,
Got theoretical question.
I'm creating a simple application using KohanaPHP framework, just fyi. This is my first time with framework and have one - maybe stupid for some of you - question.
While developing classes or functions I'm commeting my code using DocBlock. Just wondering how should I comment my code while using framework? I meant to code some parts of the code, not whole controllers.
Basically, I'm using following methods:
// Check if variable_name is greater than zero
if($this->var > 0) {
// do something
} else {
// do something
}
if( $result ) {
// display confirmation message
} else {
// display errors
}
Am I doing it right way? Is there any standard for inserting comments in the code?
Edit: Let me explain, I'm not using comments like "check if variable is greater than zero". I'm just wondering if is it good practice to put comments into the code.
Regards, Tom