Completed
Branch master (910c19)
by Dmitri
01:43
created

DoctrineSchema   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Damax\Bundle\ApiAuthBundle\Tests\Key\Storage;
6
7
use Doctrine\DBAL\Schema\Schema;
8
use Doctrine\DBAL\Schema\Table;
9
10
class DoctrineSchema
11
{
12
    public static function create(): Table
13
    {
14
        $table = (new Schema())->createTable('api_key');
15
16
        $table
17
            ->addColumn('key', 'string')
18
            ->setFixed(true)
19
            ->setLength(40)
20
        ;
21
22
        $table->addColumn('ttl', 'integer');
23
        $table->addColumn('identity', 'string');
24
25
        return $table;
26
    }
27
}
28