I generate my entities using doctrine mapping in symfony2, and get this code:
/**
* Get active
*
* @return boolean
*/
public function getActive() {
return $this->active;
}
Using jenkins and PMD plugin, they throw BooleanGetMethodName warnings and suggest that because getActive function return boolean, it should be renamed to isActive or hasActive.
I have a lot of files that have this warning. Is it good to suppress the warnings? If yes, how? Or should I replace all functions name returning boolean value in symfony2 entity to follow jenkins and PMD rule?