| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | public static function fromArray(array $properties): self |
||
| 10 | { |
||
| 11 | $properties = collect($properties) |
||
| 12 | ->keyBy(fn ($value, $key) => Str::snake($key)); |
||
| 13 | |||
| 14 | return new static( |
||
| 15 | $properties['uuid'], |
||
| 16 | $properties['name'] ?? '', |
||
| 17 | $properties['order'] ?? 0, |
||
| 18 | $properties['custom_properties'] ?? [], |
||
| 19 | $properties['custom_headers'] ?? [], |
||
| 20 | $properties['file_name'] ?? null, |
||
| 21 | ); |
||
| 34 |