We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||||
2 | |||||
3 | namespace Backpack\CRUD\Tests\Config\Models; |
||||
4 | |||||
5 | use Backpack\CRUD\app\Models\Traits\CrudTrait; |
||||
6 | use Illuminate\Contracts\Auth\MustVerifyEmail; |
||||
7 | use Illuminate\Foundation\Auth\User as Authenticatable; |
||||
8 | |||||
9 | class User extends Authenticatable implements MustVerifyEmail |
||||
10 | { |
||||
11 | use CrudTrait; |
||||
0 ignored issues
–
show
introduced
by
![]() |
|||||
12 | |||||
13 | protected $table = 'users'; |
||||
14 | |||||
15 | protected $fillable = ['name', 'email', 'password', 'extras', 'bang_relation_field']; |
||||
16 | |||||
17 | public function identifiableAttribute() |
||||
18 | { |
||||
19 | return 'name'; |
||||
20 | } |
||||
21 | |||||
22 | /** |
||||
23 | * Get the account details associated with the user. |
||||
24 | */ |
||||
25 | public function accountDetails() |
||||
26 | { |
||||
27 | return $this->hasOne('Backpack\CRUD\Tests\config\Models\AccountDetails'); |
||||
28 | } |
||||
29 | |||||
30 | /** |
||||
31 | * Get the articles for this user. |
||||
32 | */ |
||||
33 | public function articles() |
||||
34 | { |
||||
35 | return $this->hasMany('Backpack\CRUD\Tests\config\Models\Article'); |
||||
36 | } |
||||
37 | |||||
38 | /** |
||||
39 | * Get the user roles. |
||||
40 | */ |
||||
41 | public function roles() |
||||
42 | { |
||||
43 | return $this->belongsToMany('Backpack\CRUD\Tests\config\Models\Role', 'user_role'); |
||||
44 | } |
||||
45 | |||||
46 | public function getNameComposedAttribute() |
||||
47 | { |
||||
48 | return $this->name.'++'; |
||||
49 | } |
||||
50 | |||||
51 | public function comment() |
||||
52 | { |
||||
53 | return $this->morphOne('Backpack\CRUD\Tests\config\Models\Comment', 'commentable'); |
||||
54 | } |
||||
55 | |||||
56 | public function recommends() |
||||
57 | { |
||||
58 | return $this->morphToMany('Backpack\CRUD\Tests\config\Models\Recommend', 'recommendable')->withPivot('text'); |
||||
59 | } |
||||
60 | |||||
61 | public function recommendsDuplicate() |
||||
62 | { |
||||
63 | return $this->morphToMany('Backpack\CRUD\Tests\config\Models\Recommend', 'recommendable')->withPivot(['text', 'id']); |
||||
64 | } |
||||
65 | |||||
66 | public function bills() |
||||
67 | { |
||||
68 | return $this->morphToMany('Backpack\CRUD\Tests\config\Models\Bill', 'billable'); |
||||
69 | } |
||||
70 | |||||
71 | public function stars() |
||||
72 | { |
||||
73 | return $this->morphMany('Backpack\CRUD\Tests\config\Models\Star', 'starable'); |
||||
74 | } |
||||
75 | |||||
76 | public function superArticles() |
||||
77 | { |
||||
78 | return $this->belongsToMany('Backpack\CRUD\Tests\config\Models\Article', 'articles_user')->withPivot(['notes', 'start_date', 'end_date']); |
||||
79 | } |
||||
80 | |||||
81 | public function superArticlesDuplicates() |
||||
82 | { |
||||
83 | return $this->belongsToMany('Backpack\CRUD\Tests\config\Models\Article', 'articles_user') |
||||
84 | ->withPivot(['notes', 'start_date', 'end_date', 'id']) |
||||
85 | ->using('Backpack\CRUD\Tests\config\Models\SuperArticlePivot'); |
||||
86 | } |
||||
87 | |||||
88 | public function universes() |
||||
89 | { |
||||
90 | return $this->hasMany('Backpack\CRUD\Tests\config\Models\Universe'); |
||||
91 | } |
||||
92 | |||||
93 | public function planets() |
||||
94 | { |
||||
95 | return $this->hasMany('Backpack\CRUD\Tests\config\Models\Planet'); |
||||
96 | } |
||||
97 | |||||
98 | public function planetsNonNullable() |
||||
99 | { |
||||
100 | return $this->hasMany('Backpack\CRUD\Tests\config\Models\PlanetNonNullable'); |
||||
101 | } |
||||
102 | |||||
103 | public function comets() |
||||
104 | { |
||||
105 | return $this->hasMany('Backpack\CRUD\Tests\config\Models\Comet'); |
||||
106 | } |
||||
107 | |||||
108 | public function bang() |
||||
109 | { |
||||
110 | return $this->belongsTo('Backpack\CRUD\Tests\config\Models\Bang', 'bang_relation_field'); |
||||
111 | } |
||||
112 | |||||
113 | public function incomes() |
||||
114 | { |
||||
115 | return $this->hasMany('Backpack\CRUD\Tests\config\Models\Transaction')->ofType('income'); |
||||
116 | } |
||||
117 | |||||
118 | public function expenses() |
||||
119 | { |
||||
120 | return $this->hasMany('Backpack\CRUD\Tests\config\Models\Transaction')->ofType('expense'); |
||||
121 | } |
||||
122 | |||||
123 | protected function isNotRelation() |
||||
124 | { |
||||
125 | return false; |
||||
126 | } |
||||
127 | |||||
128 | public function isNotRelationPublic($arg) |
||||
0 ignored issues
–
show
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
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
129 | { |
||||
130 | return false; |
||||
131 | } |
||||
132 | } |
||||
133 |