| @@ 482-490 (lines=9) @@ | ||
| 479 | } |
|
| 480 | ||
| 481 | $method = $meta->propertyMetadata[$field]->method; |
|
| 482 | if ($old !== null) { |
|
| 483 | // check if an object has the required method to avoid a fatal error |
|
| 484 | if (!method_exists($old, $method)) { |
|
| 485 | throw new \ReflectionException( |
|
| 486 | sprintf('Try to call to undefined method %s::%s', get_class($old), $method) |
|
| 487 | ); |
|
| 488 | } |
|
| 489 | $old = $old->{$method}(); |
|
| 490 | } |
|
| 491 | if ($new !== null) { |
|
| 492 | // check if an object has the required method to avoid a fatal error |
|
| 493 | if (!method_exists($new, $method)) { |
|
| @@ 491-499 (lines=9) @@ | ||
| 488 | } |
|
| 489 | $old = $old->{$method}(); |
|
| 490 | } |
|
| 491 | if ($new !== null) { |
|
| 492 | // check if an object has the required method to avoid a fatal error |
|
| 493 | if (!method_exists($new, $method)) { |
|
| 494 | throw new \ReflectionException( |
|
| 495 | sprintf('Try to call to undefined method %s::%s', get_class($new), $method) |
|
| 496 | ); |
|
| 497 | } |
|
| 498 | $new = $new->{$method}(); |
|
| 499 | } |
|
| 500 | } |
|
| 501 | ||
| 502 | $newValues[$field] = [ |
|