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