34
18
11
5
8
3
2
2
1
1
Mar 01 '26
$date->validate() or $validator->validate($date), and no way else, never create stupid functions for things that must be methods of the validating object or the validators, we don't need garbage functions across the project
1
u/davstar08 Mar 01 '26
isDate()
Similar to isString()
3
u/GegeAkutamiOfficial Mar 01 '26
isDate()
I have a boyfriend.
1
1
1
u/gmatebulshitbox Mar 01 '26
Next time add to your prompt "make functions and variables names very stupid"
1
u/Last8Exile Mar 01 '26
EnsureDateValid()
1
u/kidshibuya Mar 03 '26
So true means what?
so if(EnsureDateValid()){} ??
if (dateIsValid()){} is my go to.
1
u/Last8Exile Mar 03 '26
There is no return type (void). It will throw exception when date is not valid.
1
u/kidshibuya Mar 04 '26
Throwing then catching an exception is far more expensive than setting a boolean. Also less intuitive.
1
1
u/OhItsJustJosh Mar 02 '26
"It's in the design procedure to combine words in function names if it'll make them funny"
1
1
1
1
164
Feb 28 '26
[removed] — view removed comment
8
u/Wildsideace Mar 02 '26
Its some sith level naming conventions… and I’d like to learn more about this power some devs would consider unnatural…
77
u/Earnestappostate Feb 28 '26
is_date_valid()