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