ApiKeyStatus   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 18
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A change() 0 7 1
1
<?php
2
3
use Phinx\Migration\AbstractMigration;
4
5
class ApiKeyStatus extends AbstractMigration
6
{
7
    /**
8
     * Change Method.
9
     *
10
     * Write your reversible migrations using this method.
11
     *
12
     * More information on writing migrations is available here:
13
     * http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
14
     */
15 1
    public function change()
16
    {
17 1
        $apiKeys = $this->table('api_keys');
18
19 1
        $apiKeys->addColumn('status', 'set', array('values' => array('active', 'disabled', 'deleted'), 'null' => false, 'default' => 'active'));
20 1
        $apiKeys->save();
21 1
    }
22
}
23