Test Failed
Pull Request — master (#58)
by Dmitriy
02:49
created

CodeFileWriteOperationEnum   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 23
rs 10

1 Method

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