Code Duplication    Length = 8-8 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Tests/Bookmark/Gateway/DoctrineDatabaseTest.php 1 location

@@ 166-173 (lines=8) @@
163
        );
164
    }
165
166
    private function loadBookmark(int $id): array
167
    {
168
        $data = $this->connection
169
            ->executeQuery('SELECT * FROM ezcontentbrowsebookmark WHERE id = :id', ['id' => $id])
170
            ->fetch(PDO::FETCH_ASSOC);
171
172
        return is_array($data) ? $data : [];
173
    }
174
}
175

eZ/Publish/Core/Persistence/Legacy/Tests/Notification/Gateway/DoctrineDatabaseTest.php 1 location

@@ 182-189 (lines=8) @@
179
        );
180
    }
181
182
    private function loadNotification(int $id): array
183
    {
184
        $data = $this->connection
185
            ->executeQuery('SELECT * FROM eznotification WHERE id = :id', ['id' => $id])
186
            ->fetch(PDO::FETCH_ASSOC);
187
188
        return is_array($data) ? $data : [];
189
    }
190
}
191