MyriadIssue   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 18
ccs 2
cts 4
cp 0.5
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTable() 0 3 1
A title() 0 3 1
1
<?php
2
3
namespace MyriadDataStore\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\Relations\BelongsTo;
7
8
class MyriadIssue extends Model
9
{
10
    public $incrementing = false;
11
12
    protected $guarded = [];
13
14
    protected $casts = [
15
        'publication_date' => 'date',
16
    ];
17
18 2
    public function getTable(): string
19
    {
20 2
        return config('myriad-data-store.tables.issues');
21
    }
22
23
    public function title(): BelongsTo
24
    {
25
        return $this->belongsTo(MyriadTitle::class, 'title_id', 'id');
26
    }
27
}
28