You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Personally, I think it should be possible to know if a method is expected to return == 1 or >= 1 results. I was the opinion that it is part of the style guide already, but I could not find it today.
Of course, a method ending with an s can still return only one result, but it should be an array.
I completely agree. I'll just add that apart from arrays we have other collections that might be a reasonable result (e.g. hash, set, etc), plus a multi-value return.
pirj
changed the title
Sugesstion: method name should make clear how manny results are expected
Sugesstion: method name should make clear how many results are expected
Jul 4, 2019
Personally, I think it should be possible to know if a method is expected to return
== 1
or>= 1
results. I was the opinion that it is part of the style guide already, but I could not find it today.Of course, a method ending with an s can still return only one result, but it should be an array.
What are your opinions on this?
The text was updated successfully, but these errors were encountered: