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
Push — master ( 1144b4...828920 )
by Márk
07:09 queued 04:40
created

MessagesSchema::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace Bernard\Driver\Doctrine;
4
5
use Doctrine\DBAL\Schema\Schema;
6
7
/**
8
 * @package Bernard
9
 */
10
class MessagesSchema
11
{
12
    /**
13
     * Creates tables on the current schema given.
14
     *
15
     * @param Schema $schema
16
     */
17
    public static function create(Schema $schema)
18
    {
19
        static::createQueueTable($schema);
20
        static::createMessagesTable($schema);
21
    }
22
23
    /**
24
     * Creates queue table on the current schema given.
25
     *
26
     * @param Schema $schema
27
     */
28
    protected static function createQueueTable(Schema $schema)
29
    {
30
        $table = $schema->createTable('bernard_queues');
31
        $table->addColumn('name', 'string');
32
        $table->setPrimaryKey(['name']);
33
    }
34
35
    /**
36
     * Creates message table on the current schema given.
37
     *
38
     * @param Schema $schema
39
     */
40
    protected static function createMessagesTable(Schema $schema)
41
    {
42
        $table = $schema->createTable('bernard_messages');
43
        $table->addColumn('id', 'integer', [
44
            'autoincrement' => true,
45
            'unsigned' => true,
46
            'notnull' => true,
47
        ]);
48
49
        $table->addColumn('queue', 'string');
50
        $table->addColumn('message', 'text');
51
        $table->addColumn('visible', 'boolean', ['default' => true]);
52
        $table->addColumn('sentAt', 'datetime');
53
        $table->setPrimaryKey(['id']);
54
        $table->addIndex(['queue', 'sentAt', 'visible']);
55
    }
56
}
57