**
Создаем новую коллекцию, состоящую из каждого n-го атрибута.

@param $step
@param int $offset
@return static
775834
public function nth($step, $offset = 0)
    {
        $new = [];

        $position = 0;

        foreach ($this->attributes as $attribute)
        {
            if($position % $step == $offset)
                $new[] = $attribute;

            $position++;
        }

        return new static($new);
    }
866569
public function skip(int $step): ArrayCollection
    {
        $items = [];
        $pos = 0;

        foreach ($this->items as $key => $value) {
            if ($pos % $step === 0) {
                $items[$key] = $value;
            }
            $pos++;
        }

        return new static($items);
    }
244525
public function setOffset($offset) {
        if (!is_numeric($offset) || $offset < 0) {
            throw new \InvalidArgumentException("Invalid offset '$offset.'", 500);
        }

        $this->offset = (int)$offset;
        return $this;
    }
177854
private static function inFuture($step, CheckoutStepController $controller)
    {
        $currentStep = $controller->getURLParams()['Action'];
        return self::getStepIndex($step) > self::getStepIndex($currentStep);
    }
644825
public function getNext($step = 1) {
      $position = ($this->position + $step);
      return isset($this->items[$position]) ? $this->items[$position] : null;
    }
657533
public function increment($key, $step = 1)
    {
        $success = false;
        apcu_inc($this->prefixKey . $key, $step, $success);

        return $success;
    }
1190846
public function setStep($step)
    {
        $this->step = (integer)$step;
        $this->hasStep = true;

        return $this;
    }
804959
public function next($offset = 1)
    {
        $nextDateTime = clone $this->startDateTime;
        $nextDateTime->modify('+'.abs($offset).' months');
        return new Month($nextDateTime);
    }
819772
public function deserialize($data, Step $step = null, array $options = [])
    {
        $step = $step ?: new Step();

        $this->sipe('id', 'setUuid', $data, $step);
        $this->sipe('title', 'setTitle', $data, $step);
        $this->sipe('description', 'setDescription', $data, $step);

        if (in_array(Transfer::REFRESH_UUID, $options)) {
            $step->refreshUuid();
        }

        if (!empty($data['parameters'])) {
            $this->deserializeParameters($step, $data['parameters']);
        }

        if (!empty($data['picking'])) {
            $this->deserializePicking($step, $data['picking']);
        }

        if (!empty($data['items'])) {
            $this->deserializeItems($step, $data['items'], $options);
        }

        return $step;
    }
45590
public function increment(string $key, int $step = 1): int {
		return $this->driver->increment($key, abs($step));
	}
655462
public function move($offset, $whence = SEEK_SET) {
        fseek($this->stream, $offset, $whence);
        return $this;
    }
1018726
protected function withAddedStep(string $stage, callable $step, bool $replace = false)
    {
        $clone = clone $this;

        if ($replace) {
            $clone->stages[$stage] = [];
        }

        $clone->stages[$stage][] = $step;

        return $clone;
    }
250013
public function dec($field, $step = 1)
    {
        $fields = is_string($field) ? explode(',', $field) : $field;
        foreach ($fields as $field) {
            $this->data($field, ['exp', $field . '-' . $step]);
        }
        return $this;
    }
77186
public function getPrevious(int $step = 1) : Token {
      $position = ($this->position - $step);
      return ($this->items[$position]) ?? new Token();
    }
692938
public function removeStep(Step $step)
    {
        if ($this->steps->contains($step)) {
            $this->steps->removeElement($step);
        }

        return $this;
    }
380869
protected function invokeStep(Step $step, Bootstrap $bootstrap)
    {
        $bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'beforeInvokeStep', [$step, $this->identifier]);
        $identifier = $step->getIdentifier();
        $step($bootstrap);
        $bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'afterInvokeStep', [$step, $this->identifier]);
        if (isset($this->steps[$identifier])) {
            foreach ($this->steps[$identifier] as $followingStep) {
                $this->invokeStep($followingStep, $bootstrap);
            }
        }
    }
1286014
public function setOffset($offset)
    {
        if ($offset >= PHP_INT_MAX) {
            $offset = false;
        }

        $this->offset = $offset;
        return $this;
    }