Passed
Push — main ( d15a24...a2d299 )
by Tan
02:38
created

LikeTypeEnum::getValues()   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
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php
2
3
namespace CSlant\LaravelLike\Enums;
4
5
enum LikeTypeEnum: string
6
{
7
    case LIKE = 'like';
8
    case DISLIKE = 'dislike';
9
    case LOVE = 'love';
10
11
    /**
12
     * Get the values of the enum.
13
     *
14
     * @return array<int, LikeTypeEnum>
15
     */
16
    public static function getValues(): array
17
    {
18
        return [
19
            self::LIKE,
20
            self::DISLIKE,
21
            self::LOVE,
22
        ];
23
    }
24
25
    /**
26
     * Get the values of the enum as strings.
27
     *
28
     * @return array<string>
29
     */
30
    public static function getValuesAsStrings(): array
31
    {
32
        return [
33
            self::LIKE->value,
34
            self::DISLIKE->value,
35
            self::LOVE->value,
36
        ];
37
    }
38
}
39