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

@@ 60-72 (lines=13) @@
57
    /**
58
     * {@inheritdoc}
59
     */
60
    public function findAll($limit, $offset)
61
    {
62
        $data = $this->data;
63
        foreach ($data as $key => $item) {
64
            if (array_key_exists('ID', $item)) {
65
                continue;
66
            }
67
            $data[$key]['ID'] = $key;
68
        }
69
        usort($data, [$this, 'sort']);
70
71
        return $this->paginate($data, $limit, $offset);
72
    }
73
74
    /**
75
     * {@inheritdoc}