color; } /** * @inheritDoc */ public function toArray(): array { return [ 'type' => $this->type->value, 'color' => $this->color ]; } /** * @inheritDoc */ public static function fromArray(array $data): BackgroundFill { $object = new self(); $object->type = BackgroundFillType::SOLID; $object->color = $data['color']; return $object; } }