Completed
Push — master ( 7187a0...60d66c )
by Mike
02:58
created

Book   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A stores() 0 3 1
A author() 0 3 1
1
<?php namespace GeneaLabs\LaravelModelCaching\Tests\Fixtures;
2
3
use GeneaLabs\LaravelModelCaching\CachedModel;
4
use Illuminate\Database\Eloquent\Relations\BelongsTo;
5
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
6
7
class Book extends CachedModel
8
{
9
    protected $dates = [
10
        'published_at',
11
    ];
12
    protected $fillable = [
13
        'description',
14
        'published_at',
15
        'title',
16
    ];
17
18
    public function author() : BelongsTo
19
    {
20
        return $this->belongsTo(Author::class);
21
    }
22
23
    public function stores() : BelongsToMany
24
    {
25
        return $this->belongsToMany(Store::class);
26
    }
27
}
28