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 — add-update-command ( 3eac9b )
by Pedro
15:29
created

StepStatus   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 17
c 1
b 0
f 1
dl 0
loc 35
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A label() 0 7 1
A color() 0 7 1
A isFailure() 0 3 1
A isWarning() 0 3 1
1
<?php
2
3
namespace Backpack\CRUD\app\Console\Commands\Upgrade;
4
5
enum StepStatus: string
6
{
7
    case Passed = 'passed';
8
    case Warning = 'warning';
9
    case Failed = 'failed';
10
    case Skipped = 'skipped';
11
12
    public function label(): string
13
    {
14
        return match ($this) {
15
            self::Passed => 'done',
16
            self::Warning => 'warn',
17
            self::Failed => 'fail',
18
            self::Skipped => 'skip',
19
        };
20
    }
21
22
    public function color(): string
23
    {
24
        return match ($this) {
25
            self::Passed => 'green',
26
            self::Warning => 'yellow',
27
            self::Failed => 'red',
28
            self::Skipped => 'gray',
29
        };
30
    }
31
32
    public function isFailure(): bool
33
    {
34
        return $this === self::Failed;
35
    }
36
37
    public function isWarning(): bool
38
    {
39
        return $this === self::Warning;
40
    }
41
}
42