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