Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predicate 3rd parameter is restricted to array #227

ptheofan opened this issue Jan 23, 2017 · 1 comment


None yet
2 participants
Copy link

commented Jan 23, 2017

This is not a bug per say, but it is a bit funny and unexpected. Predicate constructor 3rd param is restricted to array.

class Predicate {
    public function __construct($field = null, $operator = null, array $values = null)`

So picture the following statement

new Predicate('PlaceholderTypes', PredicateOperator::EQUALS, [EAdWordsSiteLinksFeed::PLACEHOLDER_SITELINKS]),

given I'm using EQUALS, I'd expect to pass in a single value. Passing an array just feels funny (bad semantics). However I would array for IN operator (which looks great).

@fiboknacky fiboknacky self-assigned this Jan 23, 2017


This comment has been minimized.

Copy link

commented Jan 23, 2017

Hello Paris,

Thanks for your comment.
We generate the classes based on the WSDL file here.
As the parameter is an array of string, it's thus generated with the type array restriction.
It would be funny when you use EQUALS, but it works as intended. :-)


@fiboknacky fiboknacky closed this Feb 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.