Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Test Failed
Pull Request — main (#4778)
by Pedro
25:44 queued 10:58
created

User   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 105
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 22
c 0
b 0
f 0
dl 0
loc 105
rs 10
wmc 18

18 Methods

Rating   Name   Duplication   Size   Complexity  
A planets() 0 3 1
A planetsNonNullable() 0 3 1
A incomes() 0 3 1
A comets() 0 3 1
A isNotRelation() 0 3 1
A expenses() 0 3 1
A stars() 0 3 1
A getNameComposedAttribute() 0 3 1
A bang() 0 3 1
A recommends() 0 3 1
A superArticles() 0 3 1
A roles() 0 3 1
A universes() 0 3 1
A bills() 0 3 1
A accountDetails() 0 3 1
A isNotRelationPublic() 0 3 1
A comment() 0 3 1
A articles() 0 3 1
1
<?php
2
3
namespace Backpack\CRUD\Tests\Unit\Models;
4
5
use Backpack\CRUD\app\Models\Traits\CrudTrait;
6
use Illuminate\Database\Eloquent\Model;
7
8
class User extends Model
9
{
10
    use CrudTrait;
0 ignored issues
show
introduced by
The trait Backpack\CRUD\app\Models\Traits\CrudTrait requires some properties which are not provided by Backpack\CRUD\Tests\Unit\Models\User: $fakeColumns, $identifiableAttribute, $Type
Loading history...
11
12
    protected $table = 'users';
13
14
    protected $fillable = ['name', 'email', 'password', 'extras'];
15
16
    /**
17
     * Get the account details associated with the user.
18
     */
19
    public function accountDetails()
20
    {
21
        return $this->hasOne('Backpack\CRUD\Tests\Unit\Models\AccountDetails');
22
    }
23
24
    /**
25
     * Get the articles for this user.
26
     */
27
    public function articles()
28
    {
29
        return $this->hasMany('Backpack\CRUD\Tests\Unit\Models\Article');
30
    }
31
32
    /**
33
     * Get the user roles.
34
     */
35
    public function roles()
36
    {
37
        return $this->belongsToMany('Backpack\CRUD\Tests\Unit\Models\Role', 'user_role');
38
    }
39
40
    public function getNameComposedAttribute()
41
    {
42
        return $this->name.'++';
43
    }
44
45
    public function comment()
46
    {
47
        return $this->morphOne('Backpack\CRUD\Tests\Unit\Models\Comment', 'commentable');
48
    }
49
50
    public function recommends()
51
    {
52
        return $this->morphToMany('Backpack\CRUD\Tests\Unit\Models\Recommend', 'recommendable')->withPivot('text');
53
    }
54
55
    public function bills()
56
    {
57
        return $this->morphToMany('Backpack\CRUD\Tests\Unit\Models\Bill', 'billable');
58
    }
59
60
    public function stars()
61
    {
62
        return $this->morphMany('Backpack\CRUD\Tests\Unit\Models\Star', 'starable');
63
    }
64
65
    public function superArticles()
66
    {
67
        return $this->belongsToMany('Backpack\CRUD\Tests\Unit\Models\Article', 'articles_user')->withPivot(['notes', 'start_date', 'end_date']);
68
    }
69
70
    public function universes()
71
    {
72
        return $this->hasMany('Backpack\CRUD\Tests\Unit\Models\Universe');
73
    }
74
75
    public function planets()
76
    {
77
        return $this->hasMany('Backpack\CRUD\Tests\Unit\Models\Planet');
78
    }
79
80
    public function planetsNonNullable()
81
    {
82
        return $this->hasMany('Backpack\CRUD\Tests\Unit\Models\PlanetNonNullable');
83
    }
84
85
    public function comets()
86
    {
87
        return $this->hasMany('Backpack\CRUD\Tests\Unit\Models\Comet');
88
    }
89
90
    public function bang()
91
    {
92
        return $this->belongsTo('Backpack\CRUD\Tests\Unit\Models\Bang', 'bang_relation_field');
93
    }
94
95
    public function incomes()
96
    {
97
        return $this->hasMany('Backpack\CRUD\Tests\Unit\Models\Transaction')->ofType('income');
98
    }
99
100
    public function expenses()
101
    {
102
        return $this->hasMany('Backpack\CRUD\Tests\Unit\Models\Transaction')->ofType('expense');
103
    }
104
105
    protected function isNotRelation()
106
    {
107
        return false;
108
    }
109
110
    public function isNotRelationPublic($arg)
0 ignored issues
show
Unused Code introduced by
The parameter $arg is not used and could be removed. ( Ignorable by Annotation )

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

110
    public function isNotRelationPublic(/** @scrutinizer ignore-unused */ $arg)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
111
    {
112
        return false;
113
    }
114
}
115