Completed
Push — master ( f8d0aa...98b092 )
by Manel
02:17
created

Speciality   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A teachers() 0 4 1
A study_submodules() 0 4 1
1
<?php
2
namespace Scool\EnrollmentMobile\Models;
3
use Illuminate\Database\Eloquent\Model;
4
/**
5
 * Class Speciality.
6
 *
7
 * @package Scool\EnrollmentMobile\Models
8
 */
9
class Speciality extends Model
10
{
11
    /**
12
     * The teachers that belongs to the speciality.
13
     */
14
    public function teachers()
15
    {
16
        return $this->belongsToMany(config('enrollment_mobile.user_class'));
17
    }
18
    /**
19
     * The study submodules that belongs to the speciality.
20
     */
21
    public function study_submodules()
22
    {
23
        return $this->belongsToMany(Submodule::class);
24
    }
25
}