CategorySeeder::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 22

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 9.568
c 0
b 0
f 0
cc 1
nc 1
nop 0
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