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

CodeFileWriteOperationEnum::getLabels()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 0
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