|
@@ 801-803 (lines=3) @@
|
| 798 |
|
|
| 799 |
|
foreach ($values as $property => $value) { |
| 800 |
|
if (!isset(self::$annotationMetadata[$name]['properties'][$property])) { |
| 801 |
|
if ('value' !== $property) { |
| 802 |
|
throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not have a property named "%s". Available properties: %s', $originalName, $this->context, $property, implode(', ', self::$annotationMetadata[$name]['properties']))); |
| 803 |
|
} |
| 804 |
|
|
| 805 |
|
// handle the case if the property has no annotations |
| 806 |
|
if ( ! $property = self::$annotationMetadata[$name]['default_property']) { |
|
@@ 806-808 (lines=3) @@
|
| 803 |
|
} |
| 804 |
|
|
| 805 |
|
// handle the case if the property has no annotations |
| 806 |
|
if ( ! $property = self::$annotationMetadata[$name]['default_property']) { |
| 807 |
|
throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not accept any values, but got %s.', $originalName, $this->context, json_encode($values))); |
| 808 |
|
} |
| 809 |
|
} |
| 810 |
|
|
| 811 |
|
$instance->{$property} = $value; |