public function __construct(ClientInterface $client, $key, $count = 10) { $this->requiredCommand($client, 'LRANGE'); if (false === ($count = filter_var($count, FILTER_VALIDATE_INT)) || $count < 0) { throw new \InvalidArgumentException('The $count argument must be a positive integer.'); } $this->client = $client; $this->key = $key; $this->count = $count; $this->reset(); }