Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3/**
4 * Bookmark Repository Interface.
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public License,
7 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
8 * obtain one at https://mozilla.org/MPL/2.0/.
9 *
10 * @package   phpMyFAQ
11 * @author    phpMyFAQ Team
12 * @license   https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
13 */
14
15declare(strict_types=1);
16
17namespace phpMyFAQ\Bookmark;
18
19interface BookmarkRepositoryInterface
20{
21    /**
22     * Add a bookmark for the given FAQ id.
23     */
24    public function add(int $faqId): bool;
25
26    /**
27     * Return all bookmark rows for the current user.
28     *
29     * @return array<int, \stdClass>
30     */
31    public function getAll(): array;
32
33    /**
34     * Remove the bookmark for the given FAQ id.
35     */
36    public function remove(int $faqId): bool;
37
38    /**
39     * Remove all bookmarks for the current user.
40     */
41    public function removeAll(): bool;
42}