/**
  * Maps the fields to the reflector to the descriptor.
  *
  * @param MethodReflector  $reflector
  * @param MethodDescriptor $descriptor
  *
  * @return void
  */
 protected function mapReflectorToDescriptor($reflector, $descriptor)
 {
     $descriptor->setFullyQualifiedStructuralElementName($reflector->getName() . '()');
     $descriptor->setName($reflector->getShortName());
     $descriptor->setVisibility($reflector->getVisibility() ?: 'public');
     $descriptor->setFinal($reflector->isFinal());
     $descriptor->setAbstract($reflector->isAbstract());
     $descriptor->setStatic($reflector->isStatic());
     $descriptor->setLine($reflector->getLinenumber());
 }
 /**
  * Creates a Descriptor from the provided data.
  *
  * @param MethodReflector $data
  *
  * @return MethodDescriptor
  */
 public function create($data)
 {
     $methodDescriptor = new MethodDescriptor();
     $methodDescriptor->setFullyQualifiedStructuralElementName($data->getName() . '()');
     $methodDescriptor->setName($data->getShortName());
     $methodDescriptor->setVisibility($data->getVisibility() ?: 'public');
     $methodDescriptor->setFinal($data->isFinal());
     $methodDescriptor->setAbstract($data->isAbstract());
     $methodDescriptor->setStatic($data->isStatic());
     $this->assembleDocBlock($data->getDocBlock(), $methodDescriptor);
     foreach ($data->getArguments() as $argument) {
         $argumentAssembler = new ArgumentAssembler();
         $argumentDescriptor = $argumentAssembler->create($argument, $methodDescriptor->getTags()->get('param', array()));
         $methodDescriptor->getArguments()->set($argumentDescriptor->getName(), $argumentDescriptor);
     }
     $methodDescriptor->setLine($data->getLinenumber());
     return $methodDescriptor;
 }
 /**
  * @covers phpDocumentor\Descriptor\MethodDescriptor::isStatic
  * @covers phpDocumentor\Descriptor\MethodDescriptor::setStatic
  */
 public function testSettingAndGettingWhetherMethodIsStatic()
 {
     $this->assertFalse($this->fixture->isStatic());
     $this->fixture->setStatic(true);
     $this->assertTrue($this->fixture->isStatic());
 }