| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | 2 | public static function getType(int $value): ?String |
|
| 15 | { |
||
| 16 | 2 | $class = new \ReflectionClass(get_called_class()); |
|
| 17 | |||
| 18 | 2 | $constants = $class->getConstants(); |
|
| 19 | |||
| 20 | 2 | foreach ($constants as $name => $val) { |
|
| 21 | 2 | if ($val === $value) { |
|
| 22 | 2 | return $name; |
|
| 23 | } |
||
| 24 | } |
||
| 25 | |||
| 26 | 1 | return null; |
|
| 27 | } |
||
| 42 |