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::save()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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
}