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

Passed
Push — belongs-to-many-save-duplicate... ( 7c598a...7c7f5e )
by Pedro
31:33
created

User::stars()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Backpack\CRUD\Tests\Config\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\Config\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\config\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\config\Models\Article');
30
    }
31
32
    /**
33
     * Get the user roles.
34
     */
35
    public function roles()
36
    {
37
        return $this->belongsToMany('Backpack\CRUD\Tests\config\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\config\Models\Comment', 'commentable');
48
    }
49
50
    public function recommends()
51
    {
52
        return $this->morphToMany('Backpack\CRUD\Tests\config\Models\Recommend', 'recommendable')->withPivot('text');
53
    }
54
    public function recommendsDuplicate()
55
    {
56
        return $this->morphToMany('Backpack\CRUD\Tests\config\Models\Recommend', 'recommendable')->withPivot(['text', 'id']);
57
    }
58
59
    public function bills()
60
    {
61
        return $this->morphToMany('Backpack\CRUD\Tests\config\Models\Bill', 'billable');
62
    }
63
64
    public function stars()
65
    {
66
        return $this->morphMany('Backpack\CRUD\Tests\config\Models\Star', 'starable');
67
    }
68
69
    public function superArticles()
70
    {
71
        return $this->belongsToMany('Backpack\CRUD\Tests\config\Models\Article', 'articles_user')->withPivot(['notes', 'start_date', 'end_date']);
72
    }
73
74
    public function superArticlesDuplicates()
75
    {
76
        return $this->belongsToMany('Backpack\CRUD\Tests\config\Models\Article', 'articles_user')
77
                        ->withPivot(['notes', 'start_date', 'end_date', 'id'])
78
                        ->using('Backpack\CRUD\Tests\config\Models\SuperArticlePivot');
79
    }
80
81
    public function universes()
82
    {
83
        return $this->hasMany('Backpack\CRUD\Tests\config\Models\Universe');
84
    }
85
86
    public function planets()
87
    {
88
        return $this->hasMany('Backpack\CRUD\Tests\config\Models\Planet');
89
    }
90
91
    public function planetsNonNullable()
92
    {
93
        return $this->hasMany('Backpack\CRUD\Tests\config\Models\PlanetNonNullable');
94
    }
95
96
    public function comets()
97
    {
98
        return $this->hasMany('Backpack\CRUD\Tests\config\Models\Comet');
99
    }
100
101
    public function bang()
102
    {
103
        return $this->belongsTo('Backpack\CRUD\Tests\config\Models\Bang', 'bang_relation_field');
104
    }
105
106
    public function incomes()
107
    {
108
        return $this->hasMany('Backpack\CRUD\Tests\config\Models\Transaction')->ofType('income');
109
    }
110
111
    public function expenses()
112
    {
113
        return $this->hasMany('Backpack\CRUD\Tests\config\Models\Transaction')->ofType('expense');
114
    }
115
116
    protected function isNotRelation()
117
    {
118
        return false;
119
    }
120
121
    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

121
    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...
122
    {
123
        return false;
124
    }
125
}
126