@@ 289-296 (lines=8) @@ | ||
286 | private function parseDataType(Property $annotation, \ReflectionProperty $property) |
|
287 | { |
|
288 | if (!empty($annotation->parser)) { |
|
289 | if (!$property->getDeclaringClass()->hasMethod($annotation->parser)) { |
|
290 | throw new \InvalidArgumentException(sprintf( |
|
291 | "Custom parser function %s:%s() for property '%s' does not exist", |
|
292 | $property->class, |
|
293 | $annotation->parser, |
|
294 | $property->name |
|
295 | )); |
|
296 | } |
|
297 | return ['custom', $annotation->parser]; |
|
298 | } elseif (!empty($annotation->type)) { |
|
299 | return $this->parseDataTypeString($annotation->type); |
|
@@ 317-324 (lines=8) @@ | ||
314 | private function parseVirtualDataType(VirtualProperty $annotation, \ReflectionMethod $method) |
|
315 | { |
|
316 | if (!empty($annotation->parser)) { |
|
317 | if (!$method->getDeclaringClass()->hasMethod($annotation->parser)) { |
|
318 | throw new \InvalidArgumentException(sprintf( |
|
319 | "Custom parser function %s:%s() for virtual property '%s' does not exist", |
|
320 | $method->class, |
|
321 | $annotation->parser, |
|
322 | $annotation->name |
|
323 | )); |
|
324 | } |
|
325 | return ['custom', $annotation->parser]; |
|
326 | } elseif (!empty($annotation->type)) { |
|
327 | return $this->parseDataTypeString($annotation->type); |