Code Duplication    Length = 9-10 lines in 2 locations

src/Repository/AnyDataset.php 1 location

@@ 284-293 (lines=10) @@
281
     * @param string $fieldName
282
     * @return array
283
     */
284
    public function getArray($itf, $fieldName)
285
    {
286
        $it = $this->getIterator($itf);
287
        $result = array();
288
        while ($it->hasNext()) {
289
            $sr = $it->moveNext();
290
            $result [] = $sr->getField($fieldName);
291
        }
292
        return $result;
293
    }
294
295
    /**
296
     *

src/Repository/DBDataset.php 1 location

@@ 199-207 (lines=9) @@
196
     * @param string $fieldName
197
     * @return Resource
198
     */
199
    public function getArrayField(IteratorInterface $it, $fieldPK, $fieldName)
200
    {
201
        $result = array();
202
        while ($it->hasNext()) {
203
            $registro = $it->moveNext();
204
            $result [$registro->getField($fieldPK)] = $registro->getField($fieldName);
205
        }
206
        return $result;
207
    }
208
209
    /**
210
     * @access public