| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | 9 | public static function getFields() : array |
|
| 36 | { |
||
| 37 | 9 | $fields = (new ReflectionClass(static::$fields))->getConstants(); |
|
| 38 | |||
| 39 | 9 | $final = []; |
|
| 40 | 9 | foreach ($fields as $label => $name) { |
|
| 41 | 9 | $label = str_replace("_", " ", $label); |
|
| 42 | 9 | $label = strtolower($label); |
|
| 43 | 9 | $label = ucwords($label); |
|
| 44 | 9 | $final[$label] = $name; |
|
| 45 | } |
||
| 46 | 9 | return $final; |
|
| 47 | } |
||
| 48 | } |
||
| 49 |