Code Duplication    Length = 13-13 lines in 2 locations

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

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

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

@@ 49-61 (lines=13) @@
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function findAll($limit, $offset)
50
    {
51
        $data = $this->data;
52
        foreach ($data as $key => $item) {
53
            if (array_key_exists('ID', $item)) {
54
                continue;
55
            }
56
            $data[$key]['ID'] = $key;
57
        }
58
        usort($data, [$this, 'sort']);
59
60
        return $this->paginate($data, $limit, $offset);
61
    }
62
63
    /**
64
     * {@inheritdoc}