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
3namespace App\Http\Repositories\interfaces;
4
5use App\Http\Models\PromptLengthOfPost;
6use Illuminate\Support\Collection;
7
8/**
9 * Interface for prompt length of post data access operations.
10 *
11 * Abstracts prompt length of post database queries, providing methods
12 * to manage target word count options used by post AI features.
13 */
14interface IPromptLengthOfPostRepository
15{
16    /**
17     * Get all prompt length of posts ordered by newest first.
18     *
19     * @return Collection<int, PromptLengthOfPost> Collection of lengths
20     */
21    public function getAll(): Collection;
22
23    /**
24     * Find a prompt length of post by its ID.
25     *
26     * @param  string  $id  The length ID
27     * @return PromptLengthOfPost|null The length or null if not found
28     */
29    public function findById(string $id): ?PromptLengthOfPost;
30
31    /**
32     * Create a new prompt length of post.
33     *
34     * @param  array{name: string, prompt: string}  $data  The length data
35     * @return PromptLengthOfPost The created length
36     */
37    public function create(array $data): PromptLengthOfPost;
38
39    /**
40     * Update an existing prompt length of post.
41     *
42     * @param  PromptLengthOfPost  $promptLengthOfPost  The length to update
43     * @param  array{name?: string, prompt?: string}  $data  The update data
44     * @return PromptLengthOfPost The updated length
45     */
46    public function update(PromptLengthOfPost $promptLengthOfPost, array $data): PromptLengthOfPost;
47
48    /**
49     * Delete a prompt length of post.
50     *
51     * @param  PromptLengthOfPost  $promptLengthOfPost  The length to delete
52     * @return bool True if deleted successfully
53     */
54    public function delete(PromptLengthOfPost $promptLengthOfPost): bool;
55}