CategorySeeder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 28
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 22 1
1
<?php
2
3
class CategorySeeder extends Seeder {
4
5
	private $table = 'category';
6
	
7
	public function run()
8
	{
9
		$this->db->truncate($this->table);
10
11
		$data = [
12
			'id' => 1,
13
			'name' => '本',
14
		];
15
		$this->db->insert($this->table, $data);
16
		
17
		$data = [
18
			'id' => 2,
19
			'name' => 'CD',
20
		];
21
		$this->db->insert($this->table, $data);
22
		
23
		$data = [
24
			'id' => 3,
25
			'name' => 'DVD',
26
		];
27
		$this->db->insert($this->table, $data);
28
	}
29
30
}
31