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
advantage is that you can read it:
Property ended is equals to "0" and property end date i less than DateTime (or $now = new \DateTime) (...). But it also has disadvantages:
Property class is a little bit virtual,
there is no new property at all,
it doesn't have to be a property,
implementation may seems tricky
and probably something else I did not notice
Recipe
Introduce new Property class:
class Property
{
use Conditions;
publicfunction__construct($name)
{
$this->name = $name;
}
}
Adding this trait to each filter (Equals, LessThan, isNull etc) and to Property class:
This may not be the best solution, or it may be even worse than the existing one. I would like to ask you to comment on readability and/or alternative ideas.
The text was updated successfully, but these errors were encountered:
Thank you for this issue. I really like that the syntax is easy to read.
I feel it is quite difficult to write with all those parentheses and to also get a idea over how the logic tree is built. Especially when we use a complex tree like in your example.
It is quite hard to understand the current structure of the Specification. When you look at:
it's quite similar to Doctrine version (in the context of readability). I think it could be improved by such creation Specifications:
advantage is that you can read it:
Property ended is equals to "0" and property end date i less than DateTime (or $now = new \DateTime) (...). But it also has disadvantages:
Recipe
after correcting any typos it should work. Voilà.
Conclusion
This may not be the best solution, or it may be even worse than the existing one. I would like to ask you to comment on readability and/or alternative ideas.
The text was updated successfully, but these errors were encountered: