/**
  * Creates a Descriptor from the provided data.
  *
  * @param PropertyReflector $data
  *
  * @return PropertyDescriptor
  */
 public function create($data)
 {
     $propertyDescriptor = new PropertyDescriptor();
     $propertyDescriptor->setFullyQualifiedStructuralElementName($data->getName());
     $propertyDescriptor->setName($data->getShortName());
     $propertyDescriptor->setVisibility($data->getVisibility() ?: 'public');
     $propertyDescriptor->setStatic($data->isStatic());
     $propertyDescriptor->setDefault($data->getDefault());
     $this->assembleDocBlock($data->getDocBlock(), $propertyDescriptor);
     $propertyDescriptor->setLine($data->getLinenumber());
     return $propertyDescriptor;
 }
 /**
  * @param string $name The name of the current property.
  *
  * @return PropertyDescriptor
  */
 protected function whenFixtureHasPropertyInParentClassWithSameName($name)
 {
     $result = new PropertyDescriptor();
     $result->setName($name);
     $parent = new ClassDescriptor();
     $parent->getProperties()->set($name, $result);
     $class = new ClassDescriptor();
     $class->setParent($parent);
     $this->fixture->setParent($class);
     return $result;
 }