src/phpDocumentor/Descriptor/Builder/Reflector/FileAssembler.php
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
                );
            }
        }
    }
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
                );
            }
        }
    }
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 ) ; } } }
Registers the child traits with the generated File Descriptor.

@param TraitReflector[] $traits
@param FileDescriptor   $fileDescriptor

@return void
Registers the child traits with the generated File Descriptor .