User   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 2
Bugs 0 Features 2
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 58
rs 10
c 2
b 0
f 2

3 Methods

Rating   Name   Duplication   Size   Complexity  
A comments() 0 4 1
A favorites() 0 4 1
A videos() 0 4 1
1
<?php
2
3
namespace LearnParty;
4
5
use Illuminate\Foundation\Auth\User as Authenticatable;
6
7
class User extends Authenticatable
8
{
9
    /**
10
     * The attributes that are mass assignable.
11
     *
12
     * @var array
13
     */
14
    protected $fillable = [
15
        'name',
16
        'email',
17
        'username',
18
        'avatar',
19
        'provider_id',
20
        'provider',
21
        'password',
22
        'about',
23
    ];
24
25
    /**
26
     * The attributes excluded from the model's JSON form.
27
     *
28
     * @var array
29
     */
30
    protected $hidden = [
31
        'password',
32
        'remember_token',
33
    ];
34
35
    /**
36
     * A user can have many videos
37
     *
38
     * @return Object
39
     */
40
    public function videos()
41
    {
42
        return $this->hasMany('LearnParty\Video');
43
    }
44
45
    /**
46
     * A user can have many comments
47
     *
48
     * @return Object
49
     */
50
    public function comments()
51
    {
52
        return $this->hasMany('LearnParty\Comment');
53
    }
54
55
    /**
56
     * A user can have many favorites
57
     *
58
     * @return Object
59
     */
60
    public function favorites()
61
    {
62
        return $this->hasMany('LearnParty\Favorite');
63
    }
64
}
65