@@ 141-153 (lines=13) @@ | ||
138 | $metadata = new ObjectMetadata($class->name); |
|
139 | ||
140 | $properties = $class->getProperties(); |
|
141 | foreach ($properties as $property) { |
|
142 | if ($property->getDeclaringClass()->name !== $class->name) { |
|
143 | continue; |
|
144 | } |
|
145 | ||
146 | $annotation = $this->reader->getPropertyAnnotation($property, Property::class); |
|
147 | /* @var $annotation Property */ |
|
148 | if (null === $annotation) { |
|
149 | continue; |
|
150 | } |
|
151 | ||
152 | $metadata->addProperty($this->loadPropertyMetadata($annotation, $property)); |
|
153 | } |
|
154 | ||
155 | $methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC); |
|
156 | foreach ($methods as $method) { |
|
@@ 156-168 (lines=13) @@ | ||
153 | } |
|
154 | ||
155 | $methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC); |
|
156 | foreach ($methods as $method) { |
|
157 | if ($method->getDeclaringClass()->name !== $class->name) { |
|
158 | continue; |
|
159 | } |
|
160 | ||
161 | $annotation = $this->reader->getMethodAnnotation($method, VirtualProperty::class); |
|
162 | /* @var $annotation VirtualProperty */ |
|
163 | if ($annotation === null) { |
|
164 | continue; |
|
165 | } |
|
166 | ||
167 | $metadata->addProperty($this->loadVirtualMetadata($annotation, $method)); |
|
168 | } |
|
169 | ||
170 | if (null !== $object) { |
|
171 | $this->loadDiscriminatorMetadata($object, $metadata); |