1
0
Files
breadcrumb-the-shire/lib/Repository/User/BookmarkRepositoryInterface.php
fs d9805c45d3 fix: address code review findings for bookmark feature (H1–L5)
Fix broken tests (H1), align interface signatures with implementations (H3),
remove dead code (H4), add missing input guard (M1), replace raw $_SESSION
access with SessionStoreInterface (M2), sync update script schema (M4),
use shared getAppBase utility (L2), document fragment stripping (L3),
and apply app- CSS class prefix convention (L5).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 22:58:07 +01:00

37 lines
1.1 KiB
PHP

<?php
namespace MintyPHP\Repository\User;
interface BookmarkRepositoryInterface
{
/**
* @param array{limit?: int, offset?: int} $options
* @return list<array<string, mixed>>
*/
public function listByUser(int $userId, array $options = []): array;
public function nextBookmarkSortOrder(int $userId, ?int $groupId): int;
public function countByUser(int $userId): int;
/** @return array<string, mixed>|false */
public function findById(int $id, int $userId): array|false;
/** @return array<string, mixed>|false */
public function findByUserAndUrl(int $userId, string $url): array|false;
public function create(array $data): int|false;
public function update(int $id, int $userId, array $data): bool;
public function delete(int $id, int $userId): bool;
/** @param list<array{id: int, sort_order: int}> $idOrderPairs */
public function updateSortOrders(int $userId, array $idOrderPairs): bool;
/** @return list<array<string, mixed>> */
public function listByGroup(int $userId, int $groupId): array;
public function unsetGroupId(int $bookmarkId, int $userId, int $sortOrder): bool;
}