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 | namespace App\Http\Repositories\interfaces; |
| 4 | |
| 5 | use App\Http\Models\AddOns; |
| 6 | use Illuminate\Support\Collection; |
| 7 | |
| 8 | /** |
| 9 | * Interface for AddOns data access operations. |
| 10 | * |
| 11 | * Keeps database query logic out of controllers/services so the |
| 12 | * persistence layer can be swapped (e.g. future SQL migration) without |
| 13 | * touching business logic. |
| 14 | */ |
| 15 | interface IAddOnsRepository |
| 16 | { |
| 17 | /** |
| 18 | * Get all yearly addons for a given product, optionally excluding a set of |
| 19 | * identifiers, ordered by price ascending. |
| 20 | * |
| 21 | * @param string $product Product key stored on the AddOns row (e.g. "RolePlay"). |
| 22 | * @param array<int, string> $excludeIdentifiers Identifiers to exclude (e.g. freemium tiers). |
| 23 | * @return Collection<int, AddOns> |
| 24 | */ |
| 25 | public function findYearlyByProduct(string $product, array $excludeIdentifiers = []): Collection; |
| 26 | } |