-
-
Notifications
You must be signed in to change notification settings - Fork 48
Milestone
Description
Describe the Proposal
Currently following code wont pass assertion due to missing tags:
$data = [
'id' => 1,
'name' => 'Test',
'tags' => [1, 2, 3]
];
$data = type_structure([
'id' => type_integer(),
'name' => type_string(),
])->assert($data);API Adjustments
/**
* @template T of array
*
* @param T $elements
*
* @return StructureType<T>
*/
#[DocumentationDSL(module: Module::TYPES, type: DSLType::TYPE)]
function type_structure(array $elements, bool $allow_extra = false) : StructureType
{
return new StructureType($elements, $allow_extra);
}Are you intenting to also work on proposed change?
Yes
Are you interested in sponsoring this change?
None
Integration & Dependencies
No response
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done