if ($metadata['has_named_argument_constructor'
]) { // choose the first argument as the default property
$metadata['default_property'
] =
$constructor->
getParameters()[0
]->
getName();
} } if (!
($annotation instanceof Attributes
)) { continue;
} foreach ($annotation->value
as $attribute) { $this->
collectAttributeTypeMetadata($metadata,
$attribute);
} } // if not has a constructor will inject values into public properties
if ($metadata['has_constructor'
] === false
) { // collect all public properties
foreach ($class->
getProperties(ReflectionProperty::IS_PUBLIC
) as $property) { $metadata['properties'
][$property->name
] =
$property->name;
$propertyComment =
$property->
getDocComment();
if ($propertyComment === false
) {