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