Completed
Branch feature/currentUserRefactoring (c13c1d)
by Schlaefer
09:08
created

CategoriesSeed   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 17 1
1
<?php
2
use Migrations\AbstractSeed;
3
4
/**
5
 * Categories seed.
6
 */
7
class CategoriesSeed extends AbstractSeed
8
{
9
    /**
10
     * Run Method.
11
     *
12
     * Write your database seeder using this method.
13
     *
14
     * More information on writing seeds is available here:
15
     * http://docs.phinx.org/en/latest/seeding.html
16
     *
17
     * @return void
18
     */
19
    public function run()
20
    {
21
        $data = [
22
            [
23
                'id' => 1,
24
                'category_order' => 1,
25
                'category' => 'Ontopic',
26
                'description' => '',
27
                'accession' => 0,
28
                'accession_new_thread' => 1,
29
                'accession_new_posting' => 1,
30
                'thread_count' => 0,
31
            ],
32
        ];
33
34
        $table = $this->table('categories');
35
        $table->insert($data)->save();
36
    }
37
}
38