• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

daycry / auth / 22527357078

28 Feb 2026 07:22PM UTC coverage: 63.267% (+0.7%) from 62.568%
22527357078

push

github

daycry
Remove PHP 8.1 from PHPUnit CI matrix

Update .github/workflows/phpunit.yml to drop PHP 8.1 from the test matrix. CI will now run PHPUnit only on PHP 8.2 and 8.3, reducing the matrix to current supported versions.

3064 of 4843 relevant lines covered (63.27%)

41.52 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Entities/GroupUser.php
1
<?php
2

3
declare(strict_types=1);
4

5
/**
6
 * This file is part of Daycry Auth.
7
 *
8
 * (c) Daycry <daycry9@proton.me>
9
 *
10
 * For the full copyright and license information, please view
11
 * the LICENSE file that was distributed with this source code.
12
 */
13

14
namespace Daycry\Auth\Entities;
15

16
use Daycry\Auth\Models\GroupModel;
17

18
class GroupUser extends Entity
19
{
20
    /**
21
     * User $user
22
     */
23
    private ?User $user = null;
24

25
    /**
26
     * Group $group
27
     */
28
    private ?Group $group = null;
29

30
    /**
31
     * @var         list<string>
32
     * @phpstan-var list<string>
33
     * @psalm-var list<string>
34
     */
35
    protected $dates = [
36
        'created_at',
37
        'updated_at',
38
        'deleted_at',
39
        'until_at',
40
    ];
41

42
    /**
43
     * Get User
44
     */
45
    public function getUser()
×
46
    {
47
        if ($this->user instanceof User) {
×
48
            return $this->user;
×
49
        }
50

51
        $userProvider = model(service('settings')->get('Auth.userProvider'));
×
52
        $this->user   = $userProvider->where('id', $this->attributes['user_id'])->first();
×
53

54
        return $this->user;
×
55
    }
56

57
    /**
58
     * Get Group
59
     */
60
    public function getGroup()
×
61
    {
62
        if ($this->group instanceof Group) {
×
63
            return $this->group;
×
64
        }
65

66
        $groupModel  = model(GroupModel::class);
×
67
        $this->group = $groupModel->where('id', $this->attributes['group_id'])->first();
×
68

69
        return $this->group;
×
70
    }
71
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc