Completed
Push — master ( 478405...8f332a )
by Manel
06:14
created

ModulesTableSeeder   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 87
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
C run() 0 79 7
1
<?php
2
3
namespace Scool\EnrollmentMobile\Database\Seeds;
4
5
use Illuminate\Database\Seeder;
6
use Scool\EnrollmentMobile\Models\Module;
7
8
class ModulesTableSeeder extends Seeder
9
{
10
    /**
11
     * Run the database seeds.
12
     *
13
     * @return void
14
     */
15
    public function run()
16
    {
17
        try {
18
            factory(Module::class)->create(
19
                [
20
                    "name" => "MP01 - Implantació de sistemes operatius(ASIX) - Implementació de sistemes informàtics(DAM)",
21
                    "order" => 1,
22
                    "study_id" => 1
23
24
                ]
25
            );
26
        } catch (\Illuminate\Database\QueryException $exception) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
27
28
        }
29
        try {
30
            factory(Module::class)->create(
31
                [
32
                    "name" => "MP02 - Gestió de bases de dades",
33
                    "order" => 2,
34
                    "study_id" => 1
35
                ]
36
            );
37
38
        } catch (\Illuminate\Database\QueryException $exception) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
39
40
        }
41
42
        try {
43
            factory(Module::class)->create(
44
                [
45
                    "name" => "MP03 - Programació bàsica",
46
                    "order" => 3,
47
                    "study_id" => 1
48
                ]
49
            );
50
51
        } catch (\Illuminate\Database\QueryException $exception) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
52
53
        }
54
55
        try {
56
            factory(Module::class)->create(
57
                [
58
                    "name" => "MP04 - Llenguatges de marques i sistemes de gestió d'informació",
59
                    "order" => 4,
60
                    "study_id" => 1
61
                ]
62
            );
63
64
        } catch (\Illuminate\Database\QueryException $exception) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
65
66
        }
67
68
        try {
69
            factory(Module::class)->create(
70
                [
71
                    "name" => "MP01 - Module 1",
72
                    "order" => 1,
73
                    "study_id" => 2
74
                ]
75
            );
76
77
        } catch (\Illuminate\Database\QueryException $exception) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
78
79
        }
80
81
        try {
82
            factory(Module::class)->create(
83
                [
84
                    "name" => "MP02 - Module 2",
85
                    "order" => 2,
86
                    "study_id" => 2
87
                ]
88
            );
89
90
        } catch (\Illuminate\Database\QueryException $exception) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
91
92
        }
93
    }
94
}