type; } /** * Returns an array representation of the object * * @return array */ public function toArray(): array { return [ 'type' => $this->type ]; } /** * Constructs object from an array representation * * @param array $data * @return ObjectTypeInterface */ public static function fromArray(array $data): ObjectTypeInterface { $object = new self(); $object->type = $data['type']; return $object; } }