| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 82 | 3 | public static function fromArray(array $data) |
|
| 83 | { |
||
| 84 | 3 | if (! isset($data['fields'])) { |
|
| 85 | 1 | throw MissingFieldsException::fieldsNotFound(); |
|
| 86 | } |
||
| 87 | |||
| 88 | 2 | $data['fields'] = array_map(function ($item) { |
|
| 89 | 1 | return ContentTypeField::fromArray($item); |
|
| 90 | 2 | }, $data['fields']); |
|
| 91 | |||
| 92 | 2 | return self::fromArrayTrait($data); |
|
| 93 | } |
||
| 95 |