Passed
Push — master ( 9aa048...898b5e )
by Mattia
04:05
created

Account   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
c 0
b 0
f 0
dl 0
loc 26
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A stats() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Minepic\Models;
6
7
use Illuminate\Database\Eloquent\Model;
8
use Illuminate\Database\Eloquent\Relations\BelongsTo;
9
10
/**
11
 * Class Accounts.
12
 *
13
 * @property int            $id
14
 * @property string         $uuid
15
 * @property string         $username
16
 * @property int            $fail_count
17
 * @property string         $skin
18
 * @property string         $cape
19
 * @property \Carbon\Carbon $created_at
20
 * @property \Carbon\Carbon $updated_at
21
 * @property AccountStats   $stats
22
 *
23
 * @method static \Illuminate\Database\Eloquent\Builder|Account newModelQuery()
24
 * @method static \Illuminate\Database\Eloquent\Builder|Account newQuery()
25
 * @method static \Illuminate\Database\Eloquent\Builder|Account query()
26
 * @method static \Illuminate\Database\Eloquent\Builder|Account whereUuid($value)
27
 * @method static \Illuminate\Database\Eloquent\Builder|Account whereUsername($value)
28
 * @mixin \Eloquent
29
 */
30
class Account extends Model
31
{
32
    /**
33
     * Table name.
34
     *
35
     * @var string
36
     */
37
    protected $table = 'accounts';
38
39
    /**
40
     * @var array
41
     */
42
    protected $fillable = [
43
        'uuid',
44
        'username',
45
        'fail_count',
46
        'skin',
47
        'cape',
48
    ];
49
50
    /**
51
     * @return BelongsTo
52
     */
53
    public function stats(): BelongsTo
54
    {
55
        return $this->belongsTo(AccountStats::class, 'uuid', 'uuid');
56
    }
57
}
58