I am writing a class that has lots of getters and setters and was wondering on what people thought about the following:
The normal way is to code like the following:
public function setChangeSort($changeSort)
{
self::$changeSort = $changeSort;
}
public function getChangeSort()
{
return self::$changeSort;
}
What are your opinions on doing the following:
public function setChangeSort($changeSort) { self::$changeSort = $changeSort; }
public function getChangeSort() { return self::$changeSort; }
I have no problem doing it the orginal way, as that is how it shoul be done. It just seems to take up alot of space in my classon functions that are really obvious in what they do.
Thanks in advance.