public function __construct($count, $skip = null)
{
if (!is_int($count) || $count < 1) {
throw new \InvalidArgumentException("count must be an integer greater than or equal to 1");
}
if ($skip === null) {
$skip = $count;
}
if (!is_int($skip) || $skip < 1) {
throw new \InvalidArgumentException("skip must be an integer great than 0");
}
$this->count = $count;
$this->skip = $skip;
}