GamesSavegame::gamefile()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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 GamesSavegame.
14
 *
15
 * @property int $id
16
 * @property int $user_id
17
 * @property int $gamefile_id
18
 * @property int $slot_id
19
 * @property mixed $save_data
20
 * @property \Carbon\Carbon $created_at
21
 * @property \Carbon\Carbon $updated_at
22
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesSavegame whereCreatedAt($value)
23
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesSavegame whereGamefileId($value)
24
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesSavegame whereId($value)
25
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesSavegame whereSaveData($value)
26
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesSavegame whereSlotId($value)
27
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesSavegame whereUpdatedAt($value)
28
 * @method static \Illuminate\Database\Query\Builder|\App\Models\GamesSavegame whereUserId($value)
29
 * @mixin \Eloquent
30
 * @property-read \App\Models\GamesFile $gamefile
31
 */
32
class GamesSavegame extends Model
33
{
34
    public $timestamps = true;
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 2 spaces but found 1 space

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

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
35
    protected $table = 'games_savegames';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

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

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
36
    protected $fillable = [
37
        'user_id',
38
        'gamefile_id',
39
        'slot_id',
40
        'save_data',
41
    ];
42
43
    protected $guarded = [];
44
45
    public function gamefile()
46
    {
47
        return $this->hasOne('App\Models\GamesFile', 'id', 'gamefile_id');
48
    }
49
}
50