Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
AdminUserInvitationRepository
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 getPendingByCompanyId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace App\Http\Repositories;
4
5use App\Http\Models\Admin\AdminUserInvitation;
6use Illuminate\Support\Collection;
7
8/**
9 * Repository for AdminUserInvitation data access.
10 *
11 * Handles all database queries related to pending user invitations.
12 * Business logic belongs in the Service layer.
13 */
14class AdminUserInvitationRepository
15{
16    /**
17     * Get all pending invitations for a given company ID.
18     *
19     * @param  string  $companyId  The MongoDB company _id string
20     * @return Collection<int, AdminUserInvitation>
21     */
22    public function getPendingByCompanyId(string $companyId): Collection
23    {
24        return AdminUserInvitation::where('company_id', $companyId)->get();
25    }
26}