Completed
Push — master ( b561f2...83b79f )
by Emmanuel
01:47
created

TicketActivity::targetable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace RexlManu\LaravelTickets\Models;
5
6
7
use Illuminate\Database\Eloquent\Model;
8
use RexlManu\LaravelTickets\Traits\HasConfigModel;
9
10 View Code Duplication
class TicketActivity extends Model
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
11
{
12
    use HasConfigModel;
13
14
    protected $fillable = [
15
        'type'
16
    ];
17
18
    public function ticket()
19
    {
20
        return $this->belongsTo(Ticket::class, 'ticket_id');
21
    }
22
23
    public function getTable()
24
    {
25
        return config('laravel-tickets.database.ticket-activities-table');
26
    }
27
28
    public function targetable()
29
    {
30
        return $this->morphTo();
31
    }
32
}
33