#[ObjectShape(["age" => "int", "name" => "string"])] * * This usage applied on an element effectively means that the object has 2 fields, the names are "age" and "name", and the corresponding types are "int" and "string". */ #[Attribute(Attribute::TARGET_FUNCTION|Attribute::TARGET_METHOD|Attribute::TARGET_PARAMETER|Attribute::TARGET_PROPERTY)] class ObjectShape { public function __construct(array $shape) {} }