Comment Best Practices
How many times have you seen this:
/**
* @param int $id
* @param string $name
* @return string
*/
public function getFileName(int $id, string $name) : string
This is a prime example of useless comments, and unfortunately, I see this all the time...
blog.phpfui.com6 min read
Miki Szeles
Everything related to test automation
This is an awesome article Bruce. Very important topic.
I use comments very scarcely. Only when I am documenting a method or in case I have an exact reason why I have written a method that way. One big problem with comments that they are usually not following the changes of the code. Instead of comments you should use meaningful variable and method names exatcly as you said. ๐