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

Test Setup Failed
Branch master (114f68)
by Mark
08:50
created

CleanupPlugins::up()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 24
Code Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 19
nc 1
nop 0
dl 0
loc 24
rs 8.9713
c 1
b 0
f 0
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Migrations\Migration;
5
6
class CleanupPlugins extends Migration
7
{
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function up()
14
    {
15
        Schema::drop('carousels');
16
        Schema::drop('carousel_slides');
17
        Schema::drop('images');
18
        Schema::drop('notifications');
19
        Schema::drop('articles');
20
        Schema::drop('plugin_feeds');
21
        Schema::drop('plugin_options');
22
23
        $plugin = app(\App\Classes\Repositories\PluginRepository::class);
24
25
        $plugin->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

25
        $plugin->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...
26
        $plugin->whereName('news')->delete();
27
        $plugin->whereName('facebook')->delete();
28
29
        $item = $plugin->whereName('menus');
30
        $item->setVersion('2.6')->setRequired(false)->save();
0 ignored issues
show
Bug introduced by
The method save() 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

30
        $item->setVersion('2.6')->setRequired(false)->/** @scrutinizer ignore-call */ save();

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...
Bug introduced by
The method setRequired() 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

30
        $item->setVersion('2.6')->/** @scrutinizer ignore-call */ setRequired(false)->save();

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...
Bug introduced by
The method setVersion() 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

30
        $item->/** @scrutinizer ignore-call */ 
31
               setVersion('2.6')->setRequired(false)->save();

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...
31
        $item = $plugin->whereName('pages');
32
        $item->setVersion('2.1')->setRequired(false)->save();
33
        $item = $plugin->whereName('redirects');
34
        $item->setVersion('1.9')->setEnabled(true)->setRequired(false)->save();
0 ignored issues
show
Bug introduced by
The method setEnabled() 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

34
        $item->setVersion('1.9')->/** @scrutinizer ignore-call */ setEnabled(true)->setRequired(false)->save();

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...
35
        $item = $plugin->whereName('products');
36
        $item->setVersion('1.3')->save();
37
    }
38
39
    /**
40
     * Reverse the migrations.
41
     *
42
     * @return void
43
     */
44
    public function down()
45
    {
46
        //
47
    }
48
}
49