/**
  * @param ReflectionClass $reflectionClass
  * @return ReflectionMethodMagic[]|array
  */
 public function extractFromReflection(ReflectionClass $reflectionClass)
 {
     $this->reflectionClass = $reflectionClass;
     $methods = [];
     if ($reflectionClass->hasAnnotation('method')) {
         foreach ($reflectionClass->getAnnotation('method') as $annotation) {
             $methods += $this->processMagicMethodAnnotation($annotation);
         }
     }
     return $methods;
 }
 public function extractFromReflection(ReflectionClass $reflectionClass)
 {
     $this->reflectionClass = $reflectionClass;
     $properties = [];
     foreach (['property', 'property-read', 'property-write'] as $annotationName) {
         if ($reflectionClass->hasAnnotation($annotationName)) {
             foreach ($reflectionClass->getAnnotation($annotationName) as $annotation) {
                 $properties += $this->processMagicPropertyAnnotation($annotation, $annotationName);
             }
         }
     }
     return $properties;
 }