betfair-php icon indicating copy to clipboard operation
betfair-php copied to clipboard

Problem with setMarketProjection

Open marncz opened this issue 8 years ago • 1 comments

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

marncz avatar Nov 15 '16 19:11 marncz

/** * @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'

filipemansano avatar Jul 17 '17 06:07 filipemansano