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.

CreateMenusTable   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A up() 0 18 1
A down() 0 4 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
use Kalnoy\Nestedset\NestedSet;
7
8
class CreateMenusTable 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...
9
{
10
    protected $table_menus;
11
12
    public function __construct()
13
    {
14
        $this->table_menus = config('back-project.menus.table');
15
    }
16
17
    /**
18
     * Run the migrations.
19
     *
20
     * @return void
21
     */
22
    public function up()
23
    {
24
        Schema::create($this->table_menus, function(Blueprint $table) {
0 ignored issues
show
Bug introduced by
The method create() does not exist on Illuminate\Support\Facades\Schema. Did you maybe mean createFreshMockInstance()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
25
            $table->increments('id');
26
            $table->string('name')->index();
27
            $table->string('permission')->nullable()->index();
28
            $table->string('title');
29
            $table->string('description')->nullable();
30
            $table->string('route')->nullable();
31
            $table->string('icon')->nullable();
32
            $table->boolean('is_active')->default(1);
33
            $table->boolean('is_protected')->default(0);
34
            NestedSet::columns($table);
35
            $table->timestamps();
36
37
38
        });
39
    }
40
41
    /**
42
     * Reverse the migrations.
43
     *
44
     * @return void
45
     */
46
    public function down()
47
    {
48
        Schema::dropIfExists($this->table_menus);
49
    }
50
}
51