I just began implementing this in a project. To have all testable (my own code), I decided to inject the Itunes\Validator by dependency injection (I am doing a Symfony project). I just noticed that there is a small issue in setting the endpoint.
In the contruct there is a check if the endpoint is a valid one (or production, or sandbox).
In the set endpoint-method this check is missing. Obviously this is not a problem for me, but it is not logic.
It would be better to move the check to the sentEndpoint method, then call this method in the construct (preventing duplicate code obviously).
As said, not a big issue that I can work around/live with
I just began implementing this in a project. To have all testable (my own code), I decided to inject the Itunes\Validator by dependency injection (I am doing a Symfony project). I just noticed that there is a small issue in setting the endpoint.
In the contruct there is a check if the endpoint is a valid one (or production, or sandbox). In the set endpoint-method this check is missing. Obviously this is not a problem for me, but it is not logic.
It would be better to move the check to the sentEndpoint method, then call this method in the construct (preventing duplicate code obviously).
As said, not a big issue that I can work around/live with