AttendancesSeeder::createAttendancesType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Scool\Timetables\Database\Seeds;
4
5
use Illuminate\Database\Seeder;
6
use Scool\Timetables\Models\Attendance;
7
use Scool\Timetables\Models\AttendanceType;
8
9
/**
10
 * Class AttendancesSeeder
11
 * @package Scool\Timetables\Database\Seeds
12
 */
13
class AttendancesSeeder extends Seeder
14
{
15
    /**
16
     * Run the database seeds.
17
     *
18
     * @return void
19
     */
20
    public function run()
21
    {
22
        //        $this->createAttendancesType(AttendanceType::R_TYPE);
0 ignored issues
show
Unused Code Comprehensibility introduced by
57% 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...
23
//        $this->createAttendancesType(AttendanceType::RJ_TYPE);
24
//        $this->createAttendancesType(AttendanceType::F_TYPE);
25
//        $this->createAttendancesType(AttendanceType::FJ_TYPE);
26
//        $this->createAttendancesType(AttendanceType::E_TYPE);
27
//        $this->createAttendances();
28
    }
29
30
    public function createAttendances()
31
    {
32
        factory(Attendance::class, 30)->create();
33
    }
34
35
36
    private function createAttendancesType($name)
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
37
    {
38
        AttendanceType::firstOrCreate([
39
            'name' => $name
40
        ]);
41
    }
42
}
43