| Conditions | 3 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function __construct(array $attributes = []) |
||
| 44 | { |
||
| 45 | $this->attribute_casting['biosCharacteristics'] = function ($values) { |
||
| 46 | $characteristics = []; |
||
| 47 | |||
| 48 | foreach ($values as $constant) { |
||
| 49 | if (trim($characteristic = BiosCharacteristics::string($constant)) === '') { |
||
| 50 | $characteristics[$constant] = 'UNKNOWN'; |
||
| 51 | continue; |
||
| 52 | } |
||
| 53 | |||
| 54 | $characteristics[$constant] = $characteristic; |
||
| 55 | } |
||
| 56 | |||
| 57 | return $characteristics; |
||
| 58 | }; |
||
| 59 | |||
| 60 | parent::__construct($attributes); |
||
| 61 | } |
||
| 63 |