Spec   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 1
dl 0
loc 12
ccs 0
cts 2
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A buyable() 0 4 1
1
<?php
2
3
namespace UniSharp\Buyable\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use UniSharp\Buyable\Contracts\ProductUnitContract;
7
8
class Spec extends Model implements ProductUnitContract
9
{
10
    protected $guarded = [];
11
    protected $casts = [
12
        'price' => 'integer'
13
    ];
14
15
    public function buyable()
16
    {
17
        return $this->morphTo('buyable');
18
    }
19
}
20