Note   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 28
ccs 0
cts 16
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A user() 0 4 1
A author() 0 4 1
A attachments() 0 4 1
A training() 0 4 1
1
<?php
2
3
namespace SET;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Note extends Model
8
{
9
    protected $table = 'notes';
10
    public $timestamps = true;
11
12
    protected $fillable = ['user_id', 'author_id', 'private', 'alert',
13
        'comment', 'title', ];
14
15
    public function user()
16
    {
17
        return $this->belongsTo('SET\User');
18
    }
19
20
    public function author()
21
    {
22
        return $this->belongsTo('SET\User', 'author_id');
23
    }
24
25
    public function attachments()
26
    {
27
        return $this->morphMany('SET\Attachment', 'imageable');
28
    }
29
30
    public function training()
31
    {
32
        return $this->belongsTo('SET\Training');
33
    }
34
}
35