Completed
Push — master ( 9d6293...1b9c64 )
by Tarmo
18s queued 13s
created

GetValues::getValues()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
declare(strict_types = 1);
3
/**
4
 * /src/Enum/Traits/GetValues.php
5
 *
6
 * @author TLe, Tarmo Leppänen <[email protected]>
7
 */
8
9
namespace App\Enum\Traits;
10
11
use function array_column;
12
13
/**
14
 * Trait GetValues
15
 *
16
 * @package App\Enum\Traits
17
 * @author TLe, Tarmo Leppänen <[email protected]>
18
 */
19
trait GetValues
20
{
21
    /**
22
     * @return array<int, string>
23
     */
24 11
    public static function getValues(): array
25
    {
26 11
        return array_column(self::cases(), 'value');
27
    }
28
}
29