original_string: protected function addTraits($traits, $fileDescriptor)
      {
          foreach ($traits as $trait) {
              $traitDescriptor = $this->getBuilder()->buildDescriptor($trait);
              if ($traitDescriptor) {
                  $traitDescriptor->setLocation($fileDescriptor, $trait->getLineNumber());
                  if (count($traitDescriptor->getTags()->get('package', new Collection())) == 0) {
                      $traitDescriptor->getTags()
                          ->set('package', $fileDescriptor->getTags()->get('package', new Collection()));
                  }
  
                  $fileDescriptor->getTraits()->set(
                      $traitDescriptor->getFullyQualifiedStructuralElementName(),
                      $traitDescriptor
                  );
              }
          }
      }
code: protected function addTraits($traits, $fileDescriptor)
      {
          foreach ($traits as $trait) {
              $traitDescriptor = $this->getBuilder()->buildDescriptor($trait);
              if ($traitDescriptor) {
                  $traitDescriptor->setLocation($fileDescriptor, $trait->getLineNumber());
                  if (count($traitDescriptor->getTags()->get('package', new Collection())) == 0) {
                      $traitDescriptor->getTags()
                          ->set('package', $fileDescriptor->getTags()->get('package', new Collection()));
                  }
  
                  $fileDescriptor->getTraits()->set(
                      $traitDescriptor->getFullyQualifiedStructuralElementName(),
                      $traitDescriptor
                  );
              }
          }
      }
code_tokens: protected function addTraits ( $ traits , $ fileDescriptor ) { foreach ( $ traits as $ trait ) { $ traitDescriptor = $ this -> getBuilder ( ) -> buildDescriptor ( $ trait ) ; if ( $ traitDescriptor ) { $ traitDescriptor -> setLocation ( $ fileDescriptor , $ trait -> getLineNumber ( ) ) ; if ( count ( $ traitDescriptor -> getTags ( ) -> get ( 'package' , new Collection ( ) ) ) == 0 ) { $ traitDescriptor -> getTags ( ) -> set ( 'package' , $ fileDescriptor -> getTags ( ) -> get ( 'package' , new Collection ( ) ) ) ; } $ fileDescriptor -> getTraits ( ) -> set ( $ traitDescriptor -> getFullyQualifiedStructuralElementName ( ) , $ traitDescriptor ) ; } } }
docstring: Registers the child traits with the generated File Descriptor.
  
  @param TraitReflector[] $traits
  @param FileDescriptor   $fileDescriptor
  
  @return void
docstring_tokens: Registers the child traits with the generated File Descriptor .