Something went wrong. Try again.
Parse and validate AT Protocol Lexicons with DTO generation for Laravel
Something went wrong. Try again.
664 B · 33 lines
PHP
at dev
12345678910111213141516171819202122232425262728293031323334<?php
namespace SocialDept\AtpSchema\Contracts;
interface TypeMapper{ /** * Map Lexicon type to PHP type. */ public function toPhpType(string $lexiconType): string;
/** * Map Lexicon type to PHPDoc type. */ public function toPhpDocType(string $lexiconType): string;
/** * Handle union types. * * @param array<string> $types */ public function unionType(array $types): string;
/** * Check if type is nullable. */ public function isNullable(array $definition): bool;
/** * Resolve type reference. */ public function resolveReference(string $ref): string;}