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
Push — main ( d3a2ba...cb4bdb )
by Pedro
34:31 queued 19:34
created

UpgradeCommandConfig   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 76
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 49
c 1
b 0
f 1
dl 0
loc 76
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A addons() 0 26 1
A steps() 0 14 1
A upgradeCommandSummary() 0 3 1
A upgradeCommandDescription() 0 7 1
A backpackCrudRequirement() 0 3 1
A postUpgradeCommands() 0 7 1
1
<?php
2
3
namespace Backpack\CRUD\app\Console\Commands\Upgrade\v7;
4
5
use Backpack\CRUD\app\Console\Commands\Upgrade\UpgradeCommand;
6
use Backpack\CRUD\app\Console\Commands\Upgrade\UpgradeConfigInterface;
7
use Backpack\CRUD\app\Console\Commands\Upgrade\UpgradeConfigSummaryInterface;
8
use Backpack\CRUD\app\Console\Commands\Upgrade\v7\Steps as Step;
9
10
class UpgradeCommandConfig implements UpgradeConfigInterface, UpgradeConfigSummaryInterface
11
{
12
    public function steps(): array
13
    {
14
        return [
15
            Step\EnsureLaravelVersionStep::class,
16
            Step\EnsureBackpackCrudRequirementStep::class,
17
            Step\EnsureFirstPartyAddonsAreCompatibleStep::class,
18
            Step\CheckOperationConfigFilesStep::class,
19
            Step\CheckThemeTablerConfigStep::class,
20
            Step\DetectDeprecatedWysiwygUsageStep::class,
21
            Step\DetectEditorAddonRequirementsStep::class,
22
            Step\CheckShowOperationViewPublishedStep::class,
23
            Step\CheckShowOperationComponentConfigStep::class,
24
            Step\CheckFileManagerPublishedViewsStep::class,
25
            Step\CheckListOperationViewPublishedStep::class,
26
        ];
27
    }
28
29
    public function addons(): array
30
    {
31
        return [
32
            'backpack/crud' => self::backpackCrudRequirement(),
33
            'backpack/filemanager' => '^4.0',
34
            'backpack/theme-coreuiv2' => '^2.0',
35
            'backpack/theme-coreuiv4' => '^1.2',
36
            'backpack/theme-tabler' => '^2.0',
37
            'backpack/logmanager' => '^5.1',
38
            'backpack/settings' => '^3.2',
39
            'backpack/newscrud' => '^5.2',
40
            'backpack/permissionmanager' => '^7.3',
41
            'backpack/pagemanager' => '^3.4',
42
            'backpack/menucrud' => '^4.1',
43
            'backpack/backupmanager' => '^5.1',
44
            'backpack/editable-columns' => '^3.1',
45
            'backpack/revise-operation' => '^2.1',
46
            'backpack/medialibrary-uploaders' => '^2.0',
47
            'backpack/devtools' => '^4.0',
48
            'backpack/generators' => '^4.1',
49
            'backpack/activity-log' => '^2.1',
50
            'backpack/calendar-operation' => '^1.1',
51
            'backpack/language-switcher' => '^2.1',
52
            'backpack/pan-panel' => '^1.1',
53
            'backpack/pro' => '^3.0',
54
            'backpack/translation-manager' => '^1.1',
55
        ];
56
    }
57
58
    public function upgradeCommandDescription(): ?callable
59
    {
60
        return function (UpgradeCommand $command): void {
61
            $command->note(
62
                'Before you start, make sure you have a fresh <fg=red>FULL BACKUP</> of your project and database stored safely.',
63
                'yellow',
64
                'yellow'
65
            );
66
        };
67
    }
68
69
    public function upgradeCommandSummary(): ?string
70
    {
71
        return null;
72
    }
73
74
    public static function backpackCrudRequirement(): string
75
    {
76
        return '^7.0';
77
    }
78
79
    public static function postUpgradeCommands(): array
80
    {
81
        return [
82
            'php artisan basset:clear',
83
            'php artisan config:clear',
84
            'php artisan cache:clear',
85
            'php artisan view:clear',
86
        ];
87
    }
88
}
89