CodeFileWriteOperationEnum   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 1
b 0
f 0
dl 0
loc 19
ccs 0
cts 4
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getLabels() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\Gii\Component\CodeFile;
6
7
enum CodeFileWriteOperationEnum: string
8
{
9
    /**
10
     * The code file is new.
11
     */
12
    case SAVE = 'save';
13
    /**
14
     * The new code file and the existing one are identical.
15
     */
16
    case SKIP = 'skip';
17
18
    /**
19
     * Operations map to be performed.
20
     */
21
    public static function getLabels(): array
22
    {
23
        return[
24
            self::SAVE->value => 'Save',
25
            self::SKIP->value => 'Skip',
26
        ];
27
    }
28
}
29