public function scanCollection($collection, $fields)
    {
        $fields = (array) $fields;
        foreach ($collection as $item) {
            $this->collectIdsFromItem($item, $fields);
        }

        return $this;
    }