Passed
Push — task/comment-feed ( 4588e4...75c509 )
by Yonathan
09:06 queued 18s
created

Comment   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 17
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A user() 0 3 1
A job_poster() 0 3 1
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * Class Comment
9
 *
10
 * @property int $id
11
 * @property int $job_poster_id
12
 * @property int $user_id
13
 * @property string $comment
14
 * @property string $location
15
 * @property \App\Models\Lookup\CommentType $type_id
16
 * @property \Jenssegers\Date\Date $created_at
17
 * @property \Jenssegers\Date\Date $updated_at
18
 */
19
20
class Comment extends Model
21
{
22
    /**
23
     * The attributes that are mass assignable.
24
     *
25
     * @var array
26
     */
27
    protected $fillable = ['job_poster_id', 'user_id', 'comment', 'location', 'type_id'];
28
29
    public function job_poster() // phpcs:ignore
30
    {
31
        return $this->belongsTo(\App\Models\JobPoster::class);
32
    }
33
34
    public function user() // phpcs:ignore
35
    {
36
        return $this->belongsTo(\App\Models\User::class);
37
    }
38
}
39