Speciality::study_submodules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
ccs 0
cts 4
cp 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Scool\EnrollmentMobile\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * Class Speciality.
9
 *
10
 * @package Scool\EnrollmentMobile\Models
11
 */
12
class Speciality extends Model
13
{
14
    /**
15
     * The teachers that belongs to the speciality.
16
     */
17
    public function teachers()
18
    {
19
        return $this->belongsToMany(config('enrollment_mobile.user_class'));
20
    }
21
22
    /**
23
     * The study submodules that belongs to the speciality.
24
     */
25
    public function study_submodules()
26
    {
27
        return $this->belongsToMany(Submodule::class);
28
    }
29
}
30