Comment::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Orkhanahmadov\LaravelCommentable\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class Comment extends Model
8
{
9
    protected $fillable = [
10
        'user_id',
11
        'comment',
12
        'ip_address',
13
        'user_agent',
14
    ];
15
16
    /**
17
     * Comment constructor.
18
     *
19
     * @param array $attributes
20
     */
21
    public function __construct(array $attributes = [])
22
    {
23
        parent::__construct($attributes);
24
25
        $this->setTable(config('commentable.table_name'));
26
    }
27
}
28