betfair-php
betfair-php copied to clipboard
Problem with setMarketProjection
Hello there:
Even when using original code I get this error when trying to get some data:
Catchable fatal error: Argument 1 passed to Betfair\Model\Param::setMarketProjection() must be an instance of Betfair\Model\MarketProjection, null given
Can someone help me? Tried to do:
->setMarketProjection( new MarketProjection\Betfair\Model\MarketProjection::COMPETITION )
Without any luck
/** * @param MarketProjection $marketProjection * @return $this */ public function setMarketProjection(MarketProjection $marketProjection) { $this->marketProjection = $marketProjection; return $this; }
This function need a instance of MarketProjection, but the param need a list of MarketProjection
doc http://docs.developer.betfair.com/docs/display/1smk3cen4v3lu3yomq5qye0ni/listMarketCatalogue
I think it was a small mistake to write this excerpt, just remove the need for the parameter type, or use the function 'addMarketProjection'