Closed Pitoune closed 8 years ago
@cdaguerre According to Scrutinizer I should type hint $pagination
(https://github.com/cdaguerre/php-textmaster-api/blob/feat.result.pager/lib/Textmaster/ResultPager.php#L11) as mixed
because it is what call_user_func_array
returns.
What do you think ?
You can force Scrutinizer to recognise it as an array
by adding a phpdoc
block above:
/** @var array $this->pagination */
$this->pagination = call_user_func_array(array($api, $method), $parameters);
Not sure if the above works, but I'd like to find out. However this will work:
/** @var array $pagination */
$pagination = call_user_func_array(array($api, $method), $parameters);
$this->pagination = $pagination;
@cdaguerre First solution was not working but it is OK with the second one.
Same thing here, could you squash your commits into one, eg. Added ResultPager
@pitoune Could you take a look at the Scrutinizer issues?