Study   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A enrollment() 0 4 1
1
<?php
2
3
namespace Scool\EnrollmentMobile\Models;
4
5
use Acacha\Names\Traits\Nameable;
6
use Illuminate\Database\Eloquent\Model;
7
//use Scool\EnrollmentMobile\Traits\HasCourses;
0 ignored issues
show
Unused Code Comprehensibility introduced by
43% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
8
//use Scool\EnrollmentMobile\Traits\HasDepartments;
9
//use Scool\EnrollmentMobile\Traits\HasLaw;
10
use Prettus\Repository\Contracts\Transformable;
11
use Prettus\Repository\Traits\TransformableTrait;
12
use Scool\EnrollmentMobile\Traits\HasCourses;
13
use Scool\EnrollmentMobile\Traits\HasDepartments;
14
use Scool\EnrollmentMobile\Traits\HasLaw;
15
16
/**
17
 * Class Study.
18
 *
19
 * @package Scool\EnrollmentMobile\Models
20
 */
21
class Study extends Model implements Transformable
22
{
23
    use Nameable,TransformableTrait,HasLaw,HasDepartments,HasCourses,Nameable,TransformableTrait;
24
    /**
25
     * The attributes that are mass assignable.
26
     *
27
     * @var array
28
     */
29
    protected $fillable = ['name'];
30
31
    public function enrollment()
32
    {
33
        return $this->belongsTo(Enrollment::class, 'enrollment_id');
34
    }
35
}
36