GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

EloquentGroupRepository   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 5
dl 0
loc 21
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A create() 0 3 1
A pushLink() 0 3 1
1
<?php
2
3
namespace Linkeys\UrlSigner\Support\GroupRepository;
4
5
use Linkeys\UrlSigner\Contracts\Models\Link;
6
use Linkeys\UrlSigner\Models\Group;
7
8
class EloquentGroupRepository implements GroupRepository
9
{
10
11
    /**
12
     * @var Group
13
     */
14
    private $group;
15
16 8
    public function __construct(Group $group)
17
    {
18 8
        $this->group = $group;
19 8
    }
20
21 3
    public function pushLink(Group $group, Link $link)
22
    {
23 3
        $group->links()->save($link);
24 3
    }
25
26 4
    public function create($attributes)
27
    {
28 4
        return $this->group->create($attributes);
29
    }
30
}