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

CleanupPlugins   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
B up() 0 24 1
A down() 0 2 1
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