protected function addFunctions($functions, $fileDescriptor)
    {
        foreach ($functions as $function) {
            $functionDescriptor = $this->getBuilder()->buildDescriptor($function);
            if ($functionDescriptor) {
                $functionDescriptor->setLocation($fileDescriptor, $function->getLineNumber());
                if (count($functionDescriptor->getTags()->get('package', new Collection())) == 0) {
                    $functionDescriptor->getTags()
                        ->set('package', $fileDescriptor->getTags()->get('package', new Collection()));
                }

                $fileDescriptor->getFunctions()->set(
                    $functionDescriptor->getFullyQualifiedStructuralElementName(),
                    $functionDescriptor
                );
            }
        }
    }
protected function addFunctions($functions, $fileDescriptor)
    {
        foreach ($functions as $function) {
            $functionDescriptor = $this->getBuilder()->buildDescriptor($function);
            if ($functionDescriptor) {
                $functionDescriptor->setLocation($fileDescriptor, $function->getLineNumber());
                if (count($functionDescriptor->getTags()->get('package', new Collection())) == 0) {
                    $functionDescriptor->getTags()
                        ->set('package', $fileDescriptor->getTags()->get('package', new Collection()));
                }

                $fileDescriptor->getFunctions()->set(
                    $functionDescriptor->getFullyQualifiedStructuralElementName(),
                    $functionDescriptor
                );
            }
        }
    }
protected function addFunctions ( $ functions , $ fileDescriptor ) { foreach ( $ functions as $ function ) { $ functionDescriptor = $ this -> getBuilder ( ) -> buildDescriptor ( $ function ) ; if ( $ functionDescriptor ) { $ functionDescriptor -> setLocation ( $ fileDescriptor , $ function -> getLineNumber ( ) ) ; if ( count ( $ functionDescriptor -> getTags ( ) -> get ( 'package' , new Collection ( ) ) ) == 0 ) { $ functionDescriptor -> getTags ( ) -> set ( 'package' , $ fileDescriptor -> getTags ( ) -> get ( 'package' , new Collection ( ) ) ) ; } $ fileDescriptor -> getFunctions ( ) -> set ( $ functionDescriptor -> getFullyQualifiedStructuralElementName ( ) , $ functionDescriptor ) ; } } }
Registers the child functions with the generated File Descriptor.

@param FunctionReflector[] $functions
@param FileDescriptor      $fileDescriptor

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