Code Duplication    Length = 13-13 lines in 2 locations

src/LIN3S/WPSymfonyForm/Admin/Storage/InMemoryStorage.php 1 location

@@ 34-46 (lines=13) @@
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function findAll($limit, $offset)
35
    {
36
        $data = $this->data;
37
        foreach ($data as $key => $item) {
38
            if (array_key_exists('ID', $item)) {
39
                continue;
40
            }
41
            $data[$key]['ID'] = $key;
42
        }
43
        usort($data, [$this, 'sort']);
44
45
        return $this->paginate($data, $limit, $offset);
46
    }
47
48
    /**
49
     * {@inheritdoc}

src/LIN3S/WPSymfonyForm/Admin/Storage/YamlStorage.php 1 location

@@ 40-52 (lines=13) @@
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public function findAll($limit, $offset)
41
    {
42
        $data = $this->data;
43
        foreach ($data as $key => $item) {
44
            if (array_key_exists('ID', $item)) {
45
                continue;
46
            }
47
            $data[$key]['ID'] = $key;
48
        }
49
        usort($data, [$this, 'sort']);
50
51
        return $this->paginate($data, $limit, $offset);
52
    }
53
54
    /**
55
     * {@inheritdoc}