GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#267)
by
unknown
11:15
created

m150626_000006_create_audit_mail   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 22 3
A down() 0 7 2
1
<?php
2
3
namespace bedezign\yii2\audit\migrations;
4
5
use bedezign\yii2\audit\components\Migration;
6
use yii\db\Schema;
7
8
class m150626_000006_create_audit_mail extends Migration
9
{
10
    const TABLE = '{{%audit_mail}}';
11
12
    public function up()
13
    {
14
        $this->createTable(self::TABLE, [
15
            'id'         => Schema::TYPE_PK,
16
            'entry_id'   => Schema::TYPE_INTEGER . ' NOT NULL',
17
            'created'    => Schema::TYPE_DATETIME . ' NOT NULL',
18
            'successful' => Schema::TYPE_INTEGER . ' NOT NULL',
19
            'from'       => Schema::TYPE_STRING,
20
            'to'         => Schema::TYPE_STRING,
21
            'reply'      => Schema::TYPE_STRING,
22
            'cc'         => Schema::TYPE_STRING,
23
            'bcc'        => Schema::TYPE_STRING,
24
            'subject'    => Schema::TYPE_STRING,
25
            'text'       => Schema::TYPE_BINARY,
26
            'html'       => Schema::TYPE_BINARY,
27
            'data'       => Schema::TYPE_BINARY,
28
        ], $this->db->driverName === 'mysql' ? 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB' : null);
29
30
        if ($this->db->driverName != 'sqlite') {
31
            $this->addForeignKey('fk_audit_mail_entry_id', self::TABLE, ['entry_id'], '{{%audit_entry}}', 'id');
32
        }
33
    }
34
35
    public function down()
36
    {
37
        if ($this->db->driverName != 'sqlite') {
38
            $this->dropForeignKey('fk_audit_mail_entry_id', self::TABLE);
39
        }
40
        $this->dropTable(self::TABLE);
41
    }
42
}
43