Passed
Push — dev5 ( 60964f...52deb7 )
by Ron
07:11
created

UserPermissions::User()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class UserPermissions extends Model
8
{
9
    protected $fillable = [
10
        'user_id', 'manage_users', 'run_reports', 'add_customer', 'deactivate_customer', 'use_file_links', 'create_tech_tip', 'edit_tech_tip', 'delete_tech_tip', 'create_category', 'modify_category'
11
    ];
12
13
    protected $primaryKey = 'user_id';
14
15 2
    public function User()
16
    {
17 2
        return $this->belongsTo('App\User', 'user_id', 'user_id');
18
    }
19
}
20