Completed
Push — master ( 221c44...a54410 )
by Manel
02:13
created

EnrollmentsTableSeeder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 31
rs 10
c 0
b 0
f 0
ccs 0
cts 16
cp 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A run() 0 5 1
A createEnrollment() 0 15 1
1
<?php
2
3
namespace Scool\EnrollmentMobile\Database\Seeds;
4
5
use Illuminate\Database\Seeder;
6
use Scool\EnrollmentMobile\Models\Enrollment;
7
8
class EnrollmentsTableSeeder extends Seeder
9
{
10
    /**
11
     * Run the database seeds.
12
     *
13
     * @return void
14
     */
15
    public function run()
16
    {
17
        //$this->createEnrollment("Enrollment1");
0 ignored issues
show
Unused Code Comprehensibility introduced by
86% 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...
18
        factory(Enrollment::class, 20)->create();
19
    }
20
21
22
    private function createEnrollment($name)
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
23
    {
24
        $enrollment = [
25
            'name' => $name,
26
            'validated' => true, //només les vàlides són actives.
27
            'finished' => false, //indica si la matricula està finalitzada.
28
            //$table->integer('period_id'); //De moment descartat //obligatori
0 ignored issues
show
Unused Code Comprehensibility introduced by
75% 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...
29
            'study_id' => 1,
30
            'course_id' => 1,
31
            'classroom_id' => 1
32
            //timestamps
33
        ];
34
35
        Enrollment::create($enrollment);
36
    }
37
38
}
39