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.

CreateMailmanMessagesTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 43
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
B up() 0 25 1
A down() 0 4 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
6
class CreateMailmanMessagesTable 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
        Schema::create(config('mailman.storage.database.table'), function (Blueprint $table) {
16
            $table->increments('id')->unsigned();
17
18
            $table->string('message_id', 512);
19
            $table->string('content_type', 64);
20
21
            $table->enum('status', ['allowed', 'denied']);
22
23
            $table->mediumText('from', 512);
0 ignored issues
show
Unused Code introduced by
The call to Blueprint::mediumText() has too many arguments starting with 512.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
24
            $table->mediumText('to', 512);
0 ignored issues
show
Unused Code introduced by
The call to Blueprint::mediumText() has too many arguments starting with 512.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
25
            $table->mediumText('reply_to', 512)->nullable();
0 ignored issues
show
Unused Code introduced by
The call to Blueprint::mediumText() has too many arguments starting with 512.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
26
27
            $table->mediumText('cc')->nullable();
28
            $table->mediumText('bcc')->nullable();
29
30
            $table->string('subject');
31
            $table->mediumText('body');
32
33
            $table->mediumText('instance');
34
35
            $table->timestamps();
36
        });
37
    }
38
39
    /**
40
     * Reverse the migrations.
41
     *
42
     * @return void
43
     */
44
    public function down()
45
    {
46
        Schema::drop(config('mailman.storage.database.table'));
47
    }
48
}
49