Passed
Push — master ( 8ff4e3...ffee1f )
by Samuel
03:00
created

UserActivity   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDisplayName() 0 7 1
1
<?php
2
3
namespace App\Domain\User\Enum;
4
5
enum UserActivity: string
6
{
7
    case CREATED = 'created';
8
    case UPDATED = 'updated';
9
    case DELETED = 'deleted';
10
    case READ = 'read';
11
12 1
    public function getDisplayName(): string
13
    {
14 1
        return match ($this) {
15 1
            self::CREATED => __('created'),
16 1
            self::UPDATED => __('updated'),
17 1
            self::DELETED => __('deleted'),
18 1
            self::READ => __('read'),
19 1
        };
20
    }
21
}
22