UserSetting   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 2
b 0
f 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A UserSettingType() 0 3 1
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Factories\HasFactory;
6
use Illuminate\Database\Eloquent\Model;
7
8
class UserSetting extends Model
9
{
10
    use HasFactory;
11
12
    protected $primaryKey = 'setting_id';
13
    protected $guarded    = ['setting_id', 'created_at', 'updated_at'];
14
    protected $hidden     = ['setting_id', 'user_id', 'created_at', 'updated_at'];
15
    protected $casts      = [
16
        'value' => 'boolean',
17
    ];
18
19
    public function UserSettingType()
20
    {
21
        return $this->hasOne(UserSettingType::class, 'setting_type_id', 'setting_type_id');
22
    }
23
}
24