Closed byt3sage closed 2 years ago
constructors arguments cannot be nullable if they are needed to build the query
You're correct - I misread what you actually wanted, I thought that was a tad strange.
Just to confirm @erichard , you want all needed attributes for a query to be set via a constructor and optional attributes to be set via setters?
@jaetooledev Yes exactly. Sorry for not being clear :pray:
@erichard how about this? required arguments are set via constructors, optional arguments are set via setters.
If this is okay - might it be worth me removing the checks that non-optional fields are empty in some of the queries since with type hinting they can't be null
Thanks. Looks good to me
Relating to: #10 #7
I had to do this quickly as I'm currently using this package inside a project so needed to get it working ASAP. I've added in class constructors for all the query classes as well as initialising these arguments within the constructor. I have also added in the GeoShape query to this with relating test. Furthermore, all Query classes now have setters within them.
Any feedback is welcome.
Sidenote: We need some more tests for other query classes. I'll do that once this is ready and merged.
CC @erichard