Code Duplication    Length = 13-13 lines in 2 locations

src/DbalDataProvider.php 1 location

@@ 118-130 (lines=13) @@
115
        return $this->src;
116
    }
117
118
    public function getRow()
119
    {
120
        if ($this->index < $this->getCurrentPageRowsCount()) {
121
            $this->index++;
122
            $item = $this->iterator->current();
123
            $this->iterator->next();
124
            $row = new ObjectDataRow($item, $this->getRowId());
125
            Event::fire(self::EVENT_FETCH_ROW, [$row, $this]);
126
            return $row;
127
        } else {
128
            return null;
129
        }
130
    }
131
132
    protected $_count;
133

src/EloquentDataProvider.php 1 location

@@ 87-99 (lines=13) @@
84
        return $this->src;
85
    }
86
87
    public function getRow()
88
    {
89
        if ($this->index < $this->count()) {
90
            $this->index++;
91
            $item = $this->iterator->current();
92
            $this->iterator->next();
93
            $row = new EloquentDataRow($item, $this->getRowId());
94
            Event::fire(self::EVENT_FETCH_ROW, [$row, $this]);
95
            return $row;
96
        } else {
97
            return null;
98
        }
99
    }
100
101
    /**
102
     * {@inheritdoc}