protected function processPropertyModifier(PropertyMetadata $property, $modifier, array $args)
{
$type = strtolower($modifier);
if (!isset($this->modifiers[$type])) {
throw new InvalidModifierDefinitionException("Unknown modifier '{$type}' type for {$this->currentReflection->name}::\${$property->name} property.");
}
$callback = $this->modifiers[$type];
if (!is_array($callback)) {
$callback = [$this, $callback];
}
call_user_func_array($callback, [$property, &$args]);
if (!empty($args)) {
$parts = [];
foreach ($args as $key => $val) {
if (is_numeric($key) && !is_array($val)) {
$parts[] = $val;
continue;
}
$parts[] = $key;
}
throw new InvalidModifierDefinitionException("Modifier {{$type}} in {$this->currentReflection->name}::\${$property->name} property has unknown arguments: " . implode(', ', $parts) . '.');
}
}