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

CreateSettingsTable::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
use App\Model\Setting;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateSettingsTable 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...
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        \Schema::create('settings', function (Blueprint $table) {
17
            $table->increments('id');
18
            $table->string('key');
19
            $table->string('value')->nullable();
20
            $table->string('default')->nullable();
21
            $table->timestamps();
22
        });
23
24
        $setting = new Setting;
25
        $setting->setKey('website_name');
26
        $setting->setShadow('Business Name CMS');
27
        $setting->save();
28
29
        $setting = new Setting;
30
        $setting->setKey('website_copyright');
31
        $setting->save();
32
33
        $setting = new Setting;
34
        $setting->setKey('seo_indexing');
35
        $setting->setShadow(false);
0 ignored issues
show
Bug introduced by
false of type false is incompatible with the type string expected by parameter $string of App\Model\Setting::setShadow(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

35
        $setting->setShadow(/** @scrutinizer ignore-type */ false);
Loading history...
36
        $setting->save();
37
38
        $setting = new Setting;
39
        $setting->setKey('seo_text');
40
        $setting->save();
41
42
        $setting = new Setting;
43
        $setting->setKey('seo_position');
44
        $setting->setShadow('left');
45
        $setting->save();
46
47
        $setting = new Setting;
48
        $setting->setKey('seo_separator');
49
        $setting->setShadow('|');
50
        $setting->save();
51
52
        $setting = new Setting;
53
        $setting->setKey('page_keywords');
54
        $setting->save();
55
56
        $setting = new Setting;
57
        $setting->setKey('page_description');
58
        $setting->save();
59
60
        $setting = new Setting;
61
        $setting->setKey('maintenance_mode');
62
        $setting->setShadow(true);
0 ignored issues
show
Bug introduced by
true of type true is incompatible with the type string expected by parameter $string of App\Model\Setting::setShadow(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

62
        $setting->setShadow(/** @scrutinizer ignore-type */ true);
Loading history...
63
        $setting->save();
64
65
        $setting = new Setting;
66
        $setting->setKey('address');
67
        $setting->save();
68
69
        $setting = new Setting;
70
        $setting->setKey('phone_number');
71
        $setting->save();
72
73
        $setting = new Setting;
74
        $setting->setKey('fax_number');
75
        $setting->save();
76
77
        $setting = new Setting;
78
        $setting->setKey('email_address');
79
        $setting->save();
80
81
        $setting = new Setting;
82
        $setting->setKey('facebook_id');
83
        $setting->save();
84
    }
85
86
    /**
87
     * Reverse the migrations.
88
     *
89
     * @return void
90
     */
91
    public function down()
92
    {
93
        \Schema::dropIfExists('settings');
94
    }
95
}
96