/** * Maps method annotations * * @param php.ReflectionMethod $reflect * @return [:var] */ protected function methodAnnotations($reflect) { $annotations = []; foreach ($reflect->getAttributes() as $name => $value) { $annotations[$name] = empty($value) ? null : new Value($value[0]); } return empty($annotations) ? parent::methodAnnotations($reflect) : $annotations; }