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

Passed
Branch master (114f68)
by Mark
09:17
created

OrganiseMenuTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 3
Bugs 1 Features 0
Metric Value
dl 0
loc 45
rs 10
c 3
b 1
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
B up() 0 29 1
A down() 0 2 1
1
<?php
2
3
use App\Model\Menu;
4
use Illuminate\Support\Facades\Schema;
5
use Illuminate\Database\Schema\Blueprint;
6
use Illuminate\Database\Migrations\Migration;
7
8
class OrganiseMenuTable 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
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
        Schema::table('menus', function (Blueprint $table) {
18
            $table->dropColumn('slug');
19
            $table->dropColumn('icon');
20
21
            $table->renameColumn('link', 'hyperlink');
22
            $table->renameColumn('page_id', 'page_id');
23
            $table->renameColumn('menu_id', 'parent_id');
24
            $table->renameColumn('order_id', 'order');
25
            $table->renameColumn('required', 'lock');
26
            $table->renameColumn('enabled', 'status');
27
            $table->renameColumn('editor_id', 'editor_id');
28
            $table->renameColumn('creator_id', 'creator_id');
29
        });
30
31
        Schema::table('menus', function (Blueprint $table) {
32
            $table->boolean('lock')->default(0)->nullable(false)->change();
33
        });
34
35
        $menu = new Menu;
36
        $menu->title = ('Homepage');
37
        $menu->target = ('_self');
38
        $menu->order = 1;
39
        $menu->page_id = 1;
40
        $menu->status = true;
41
        $menu->lock = true;
42
        $menu->creator_id = 1;
43
        $menu->save();
44
    }
45
46
    /**
47
     * Reverse the migrations.
48
     *
49
     * @return void
50
     */
51
    public function down()
52
    {
53
        //
54
    }
55
}
56