Account   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

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