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

CreateCarouselsTable::up()   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 34
Code Lines 27

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 27
nc 1
nop 0
dl 0
loc 34
rs 8.8571
c 0
b 0
f 0
1
<?php
2
3
use App\Model\Plugin;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
use App\Classes\Repositories\PluginRepository;
7
8
class CreateCarouselsTable extends Migration
9
{
10
    /**
11
     * Run the migrations.
12
     *
13
     * @return void
14
     */
15
    public function up()
16
    {
17
        \Schema::create('carousels', function (Blueprint $table) {
18
            $table->increments('id');
19
            $table->string('title');
20
            $table->string('style');
21
            $table->boolean('lock');
22
            $table->unsignedInteger('creator_id');
23
            $table->unsignedInteger('editor_id')->nullable();
24
            $table->softDeletes();
25
            $table->timestamps();
26
        });
27
28
        \Schema::create('carousel_slides', function (Blueprint $table) {
29
            $table->increments('id');
30
            $table->string('title')->nullable();
31
            $table->unsignedInteger('carousel_id');
32
            $table->unsignedInteger('image_id')->nullable();
33
            $table->string('link_url');
34
            $table->string('link_target');
35
            $table->integer('order_id');
36
            $table->unsignedInteger('creator_id');
37
            $table->unsignedInteger('editor_id')->nullable();
38
            $table->softDeletes();
39
            $table->timestamps();
40
        });
41
42
        /** @var Plugin $plugin */
43
        $plugin = new Plugin();
44
        $plugin->setName('carousels');
45
        $plugin->setVersion('1.0');
46
        $plugin->setIcon('fa-fast-forward');
47
        $plugin->setBackEnd(true);
48
        $plugin->save();
49
    }
50
51
    /**
52
     * Reverse the migrations.
53
     *
54
     * @return void
55
     */
56
    public function down()
57
    {
58
        \Schema::drop('carousels');
59
60
        \Schema::drop('carousel_slides');
61
62
        app(PluginRepository::class)->whereName('carousels')->delete();
0 ignored issues
show
Bug introduced by
The method delete() does not exist on stdClass. ( Ignorable by Annotation )

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

62
        app(PluginRepository::class)->whereName('carousels')->/** @scrutinizer ignore-call */ delete();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
63
    }
64
}
65