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.
Completed
Push — master ( 83a80c...1e0ac8 )
by Alireza
01:30
created

Admin::getForeignKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Serverfireteam\Panel;
3
4
use App\User;
5
6
// Delegate auth
7
class Admin extends User {
8
    protected $table = 'users';
9
10
    protected $guard_name = 'web';
11
12
    public function getMorphClass()
13
    {
14
        return parent::class;
15
    }
16
17
    public function getForeignKey()
18
    {
19
        return Str::snake(parent::class).'_'.$this->getKeyName();
20
    }
21
22
    protected static function boot()
23
    {
24
        parent::boot();
25
26
        parent::observe(new AdminObserver);
0 ignored issues
show
Comprehensibility Bug introduced by
It seems like you call parent on a different method (observe() instead of boot()). Are you sure this is correct? If so, you might want to change this to $this->observe().

This check looks for a call to a parent method whose name is different than the method from which it is called.

Consider the following code:

class Daddy
{
    protected function getFirstName()
    {
        return "Eidur";
    }

    protected function getSurName()
    {
        return "Gudjohnsen";
    }
}

class Son
{
    public function getFirstName()
    {
        return parent::getSurname();
    }
}

The getFirstName() method in the Son calls the wrong method in the parent class.

Loading history...
27
28
        static::addGlobalScope(new AdminScope);
29
    }
30
}
31