Passed
Push — master ( 25046f...2db671 )
by Mattia
03:56
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 App\Models;
6
7
use Illuminate\Database\Eloquent\Model;
8
9
/**
10
 * Class Accounts.
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
class Account extends Model
23
{
24
    /**
25
     * Table name.
26
     *
27
     * @var string
28
     */
29
    protected $table = 'accounts';
30
31
    /**
32
     * @var array
33
     */
34
    protected $fillable = [
35
        'uuid',
36
        'username',
37
        'fail_count',
38
        'skin',
39
        'cape',
40
    ];
41
42
    /**
43
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
44
     */
45
    public function stats(): \Illuminate\Database\Eloquent\Relations\BelongsTo
46
    {
47
        return $this->belongsTo(AccountStats::class, 'uuid', 'uuid');
48
    }
49
}
50