TrainingType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 27
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A trainings() 0 4 1
1
<?php
2
3
namespace SET;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class TrainingType extends Model
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $table = 'training_types';
13
    /**
14
     * @var bool
15
     */
16
    public $timestamps = true;
17
    /**
18
     * @var array
19
     */
20
    protected $fillable = ['name', 'description', 'sidebar', 'status'];
21
    /**
22
     * @var array
23
     */
24
    protected $dates = ['created_at', 'updated_at'];
25
26
    /**
27
     * Get the trainings that have the training type.
28
     */
29
    public function trainings()
30
    {
31
        return $this->hasMany('SET\Training', 'training_type_id'); // One To Many
32
    }
33
}
34