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.

EloquentLinkRepository   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
eloc 6
dl 0
loc 26
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A findByUuid() 0 3 1
A create() 0 3 1
A __construct() 0 3 1
A save() 0 3 1
1
<?php
2
3
namespace Linkeys\UrlSigner\Support\LinkRepository;
4
5
use Linkeys\UrlSigner\Contracts\Models\Link as LinkContract;
6
use Linkeys\UrlSigner\Models\Link;
7
8
class EloquentLinkRepository implements LinkRepository
9
{
10
11
    /**
12
     * @var Link
13
     */
14
    private $link;
15
16 22
    public function __construct(Link $link)
17
    {
18 22
        $this->link = $link;
19 22
    }
20
21 3
    public function findByUuid($uuid): LinkContract
22
    {
23 3
        return $this->link->where(['uuid' => $uuid])->firstOrFail();
24
    }
25
26 1
    public function save(LinkContract $link)
27
    {
28 1
        $link->save();
0 ignored issues
show
Bug introduced by
The method save() does not exist on Linkeys\UrlSigner\Contracts\Models\Link. Since it exists in all sub-types, consider adding an abstract or default implementation to Linkeys\UrlSigner\Contracts\Models\Link. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
        $link->/** @scrutinizer ignore-call */ 
29
               save();
Loading history...
29 1
    }
30
31 6
    public function create($attributes)
32
    {
33 6
        return $this->link->create($attributes);
34
    }
35
}