Modifier   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
dl 0
loc 15
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAll() 0 8 2
1
<?php declare(strict_types = 1);
2
3
4
namespace Console\Modifier;
5
6
7
use ReflectionClass;
8
use ReflectionException;
9
10
abstract class Modifier implements ModifierInterface
11
{
12
    /**
13
     * @param string $class
14
     *
15
     * @return array
16
     */
17
    public static function getAll(string $class = __CLASS__): array
18
    {
19
        try {
20
            $class = new ReflectionClass($class);
21
22
            return $class->getConstants();
23
        } catch (ReflectionException $e) {
24
            return [];
25
        }
26
27
    }
28
}