Completed
Push — master ( 58b661...a53837 )
by Francesco
09:22
created

Section   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 20
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A questions() 0 3 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace App\Models;
5
6
use App\Models\Traits\EloquentGetTableName;
7
use Illuminate\Database\Eloquent\Model;
8
use Illuminate\Database\Eloquent\Relations\HasMany;
9
use Illuminate\Database\Eloquent\SoftDeletes;
10
11
class Section extends Model
12
{
13
14
    use SoftDeletes;
15
    use EloquentGetTableName;
16
17
    /**
18
     * The attributes that should be mutated to dates.
19
     *
20
     * @var array
21
     */
22
    protected $dates = ["deleted_at"];
23
24
    /**
25
     * Get the questions of this section
26
     * @return HasMany
27
     */
28
    public function questions() : HasMany
29
    {
30
        return $this->hasMany("App\Models\Question");
31
    }
32
33
}
34