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.

TestMigration::up()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 15
ccs 0
cts 12
cp 0
rs 9.7666
c 0
b 0
f 0
cc 2
nc 2
nop 0
crap 6
1
<?php
2
/**
3
 * @link https://github.com/paulzi/yii2-json-behavior
4
 * @copyright Copyright (c) 2015 PaulZi <[email protected]>
5
 * @license MIT (https://github.com/paulzi/yii2-json-behavior/blob/master/LICENSE)
6
 */
7
8
namespace tests;
9
10
use yii\db\Schema;
11
use yii\db\Migration;
12
13
/**
14
 * @author PaulZi <[email protected]>
15
 */
16
class TestMigration extends Migration
17
{
18
    public function up()
19
    {
20
        ob_start();
21
        if ($this->db->getTableSchema('{{%item}}', true) !== null) {
22
            $this->dropTable('{{%item}}');
23
        }
24
        $this->createTable('{{%item}}', [
25
            'id'     => $this->primaryKey(),
26
            'params' => $this->text(),
27
        ]);
28
29
        // update cache (sqlite bug)
30
        $this->db->getSchema()->getTableSchema('{{%item}}', true);
31
        ob_end_clean();
32
    }
33
}