Completed
Pull Request — master (#1)
by Tyler
03:00
created

Pivot   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 21
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A boot() 0 6 1
1
<?php
2
3
namespace Tylercd100\Database\Eloquent\Relations;
4
5
use Illuminate\Database\Eloquent\Relations\Pivot as IlluminatePivot;
6
use Tylercd100\Database\Eloquent\Traits\AutoCache;
7
use Tylercd100\Database\Eloquent\Traits\AutoValidate;
8
9
abstract class Pivot extends IlluminatePivot
10
{
11
    use AutoCache {
12
        boot as bootAutoCache;
13
    }
14
15
    use AutoValidate {
16
        boot as bootAutoValidate;
17
    }
18
19
    /**
20
     * A method best used to register Eloquent events when the model boots up
21
     * @return void
22
     */
23
    protected static function boot()
24
    {
25
        parent::boot();
26
        self::bootAutoValidate();
27
        self::bootAutoCache();
28
    }
29
}
30