Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Push — master ( 861d7d...2ad8d1 )
by Cristian
04:38
created

CreateColumnTypesTable::up()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 36
Code Lines 30

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 30
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 36
rs 8.8571
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Migrations\Migration;
5
6
class CreateColumnTypesTable extends Migration
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
7
{
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function up()
14
    {
15
        // uncomment the next statement to map strings to enum types in doctrine and get over the 'Unknown database type enum' DBAL error
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 137 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
16
        // Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
0 ignored issues
show
Unused Code Comprehensibility introduced by
70% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 133 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
17
18
        Schema::create('column_types', function ($table) {
19
            $table->bigInteger('bigIntegerCol');
20
            $table->binary('binaryCol');
21
            $table->boolean('booleanCol');
22
            $table->char('charCol', 4);
23
            $table->date('dateCol');
24
            $table->dateTime('dateTimeCol');
25
            $table->dateTimeTz('dateTimeTzCol');
26
            $table->decimal('decimalCol', 5, 2);
27
            $table->double('doubleCol', 15, 8);
28
            $table->enum('enumCol', ['foo', 'bar']);
29
            $table->float('floatCol');
30
            $table->integer('integerCol');
31
            $table->ipAddress('ipAddressCol');
32
            $table->json('jsonCol');
33
            $table->jsonb('jsonbCol');
34
            $table->longText('longTextCol');
35
            $table->macAddress('macAddressCol');
36
            $table->mediumInteger('mediumIntegerCol');
37
            $table->mediumText('mediumTextCol');
38
            $table->smallInteger('smallIntegerCol');
39
            $table->string('stringCol');
40
            $table->text('textCol');
41
            $table->time('timeCol');
42
            $table->timeTz('timeTzCol');
43
            $table->tinyInteger('tinyIntegerCol');
44
            $table->timestamp('timestampCol');
45
            $table->timestampTz('timestampTzCol')->nullable();
46
            $table->uuid('uuidCol');
47
        });
48
    }
49
50
    /**
51
     * Reverse the migrations.
52
     *
53
     * @return void
54
     */
55
    public function down()
56
    {
57
        Schema::drop('column_types');
58
    }
59
}
60