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

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