Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Model instance isPersisted() and propertyIsBlank() methods #559
I propose that we add
If there are no objections, I'd be glad to implement and document this for CFWheels 2.0.
To follow up...
isClass() and isInstance() are already the opposites of each other so we can remove those from the list.
I think we can also remove isGet(), isAjax(), isPost() from the list to review since I think it's rare that you would want to use the oppose of any of those.
This leaves us with:
This may be a good time to come up with an alias for
Many of those I cannot think of antonyms for, which could be a challenge.
I do think you are being too pessimistic here.
We should provide the best options for creating readable code, and do our best to use it in documentation so developers can pick up on it.
In that regard I prefer something.hasNotChanged() over something.hasUnChanged().
We need to be careful with double negatives.
"unChanged" I don't think is a clear term.
I'm definitely more of a fan of
Rails doesn't implement any of these other than the equivalent to what would be our
Though I'm glad we took a minute to explore it, I feel like the other ideas are forced. Including the word "Not" in the name probably isn't any easier to parse mentally than the