Test Failed
Pull Request — master (#58)
by Alexander
05:19 queued 02:39
created

CodeFileWriteOperationEnum   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
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 24
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
    /**
23
     * Operations map to be performed.
24
     */
25
    public static function getLabels(): array
26
    {
27
        return[
28
            self::OP_CREATE->value => 'Create',
29
            self::OP_OVERWRITE->value => 'Overwrite',
30
            self::OP_SKIP->value => 'Skip',
31
        ];
32
    }
33
}
34