Open ps24love opened 10 years ago
Hi @ps24love thank you for the contribution :)
Why would this be better than passing the force argument as a parameter of the method?
To me this makes the code look nicer, but I'm not sure if it is a better solution.
What do you think @searsaw?
I say we have both and let the user decide which they want to use. This way anyone currently using the original style will not have broken code. We would need to add this to the README file, too.
Yeah, I definitely don't think we should break the original style.
well it obviously have no added functionality and i agree with you about original style but i think it conveys meaning w/o the developer looking at the docs to decipher the 2nd param and secondly what if i wanted to force save w/o passing the first param e.g $user->save(array(),true), well there is no way to elegantly skip params in php. You chose a reasonable default which seems quite okay, but hard to maintain in edge cases and i chose a default that easy to swap out. thanks for your reply
Yeah I agree. Would you mind updating your pull request to maintain the old way too and I'll merge this straight in.
Thank you :)
i added an attribute and a fluent method to allow use of save method without much parameters