If a method has only one statement I write the entire method on one line, unless that would cause the maximum line length to be exceeded. For example:
override public function get length\(\):int \{ return super.length + 1; \}
Not sure if I can do this. However, if I try, I need to be careful of cases with comments. Ex.
override public function get length():int { //returns one more than super return super.length + 1; }
Log in to post a comment.
Not sure if I can do this. However, if I try, I need to be careful of cases with comments. Ex.
override public function get length():int
{
//returns one more than super
return super.length + 1;
}