1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* rmarchiv.tk |
5
|
|
|
* (c) 2016-2017 by Marcel 'ryg' Hering |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace App\Models; |
9
|
|
|
|
10
|
|
|
use Illuminate\Database\Eloquent\Model; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Class GamesAward. |
14
|
|
|
* |
15
|
|
|
* @property int $id |
16
|
|
|
* @property int $game_id |
17
|
|
|
* @property int $developer_id |
18
|
|
|
* @property int $award_cat_id |
19
|
|
|
* @property int $award_page_id |
20
|
|
|
* @property int $user_id |
21
|
|
|
* @property string $deleted_at |
22
|
|
|
* @property \Carbon\Carbon $created_at |
23
|
|
|
* @property \Carbon\Carbon $updated_at |
24
|
|
|
* @property int $place |
25
|
|
|
* @property string $description |
26
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesAward whereId($value) |
27
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesAward whereGameId($value) |
28
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesAward whereDeveloperId($value) |
29
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesAward whereAwardCatId($value) |
30
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesAward whereAwardPageId($value) |
31
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesAward whereUserId($value) |
32
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesAward whereDeletedAt($value) |
33
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesAward whereCreatedAt($value) |
34
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesAward whereUpdatedAt($value) |
35
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesAward wherePlace($value) |
36
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesAward whereDescription($value) |
37
|
|
|
* @mixin \Eloquent |
38
|
|
|
* @property int $award_subcat_id |
39
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\GamesAward whereAwardSubcatId($value) |
40
|
|
|
* @property-read \App\Models\User $user |
41
|
|
|
* @property-read \App\Models\AwardCat $cat |
42
|
|
|
* @property-read \App\Models\AwardPage $page |
43
|
|
|
* @property-read \App\Models\AwardSubcat $subcat |
44
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory |
45
|
|
|
* @property-read \App\Models\Game $game |
46
|
|
|
*/ |
47
|
|
|
class GamesAward extends Model |
48
|
|
|
{ |
49
|
|
|
use \Venturecraft\Revisionable\RevisionableTrait; |
50
|
|
|
public $timestamps = true; |
|
|
|
|
51
|
|
|
protected $table = 'games_awards'; |
|
|
|
|
52
|
|
|
protected $fillable = [ |
53
|
|
|
'game_id', |
54
|
|
|
'developer_id', |
55
|
|
|
'award_cat_id', |
56
|
|
|
'award_page_id', |
57
|
|
|
'user_id', |
58
|
|
|
'place', |
59
|
|
|
'description', |
60
|
|
|
'award_subcat_id', |
61
|
|
|
]; |
62
|
|
|
|
63
|
|
|
protected $guarded = []; |
64
|
|
|
|
65
|
|
|
public function user() |
66
|
|
|
{ |
67
|
|
|
return $this->hasOne('App\Models\User', 'id', 'user_id'); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
public function cat() |
71
|
|
|
{ |
72
|
|
|
return $this->hasOne('App\Models\AwardCat', 'id', 'award_cat_id'); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
public function page() |
76
|
|
|
{ |
77
|
|
|
return $this->hasOne('App\Models\AwardPage', 'id', 'award_page_id'); |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
public function subcat() |
81
|
|
|
{ |
82
|
|
|
return $this->hasOne('App\Models\AwardSubcat', 'id', 'award_subcat_id'); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
public function game() |
86
|
|
|
{ |
87
|
|
|
return $this->hasOne('App\Models\Game', 'id', 'game_id'); |
88
|
|
|
} |
89
|
|
|
} |
90
|
|
|
|
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.