Completed
Push — master ( 2b6acf...5f05b1 )
by Christopher
03:20
created

Comment   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A commentable() 0 4 1
1
<?php
2
3
namespace Chriscreate\Blog;
4
5
use Chriscreate\Blog\Traits\Comment\CommentApproval;
6
use Chriscreate\Blog\Traits\Comment\CommentScopes;
7
use Chriscreate\Blog\Traits\IsAuthorable;
8
use Illuminate\Database\Eloquent\Model;
9
10
class Comment extends Model
11
{
12
    use CommentScopes,
13
    CommentApproval,
14
    IsAuthorable;
15
16
    protected $table = 'comments';
17
18
    protected $primaryKey = 'id';
19
20
    public $guarded = [];
21
22
    public $timestamps = true;
23
24
    public function commentable()
25
    {
26
        return $this->morphTo();
27
    }
28
}
29