original_string: public function execute(ProjectDescriptor $project)
      {
          $rootPackageDescriptor = new PackageDescriptor();
          $rootPackageDescriptor->setName('\\');
          $project->getIndexes()->set('packages', new Collection());
          $project->getIndexes()->packages['\\'] = $rootPackageDescriptor;
  
          foreach ($project->getFiles() as $file) {
              $this->addElementsOfTypeToPackage($project, array($file), 'files');
              $this->addElementsOfTypeToPackage($project, $file->getConstants()->getAll(), 'constants');
              $this->addElementsOfTypeToPackage($project, $file->getFunctions()->getAll(), 'functions');
              $this->addElementsOfTypeToPackage($project, $file->getClasses()->getAll(), 'classes');
              $this->addElementsOfTypeToPackage($project, $file->getInterfaces()->getAll(), 'interfaces');
              $this->addElementsOfTypeToPackage($project, $file->getTraits()->getAll(), 'traits');
          }
      }
code: public function execute(ProjectDescriptor $project)
      {
          $rootPackageDescriptor = new PackageDescriptor();
          $rootPackageDescriptor->setName('\\');
          $project->getIndexes()->set('packages', new Collection());
          $project->getIndexes()->packages['\\'] = $rootPackageDescriptor;
  
          foreach ($project->getFiles() as $file) {
              $this->addElementsOfTypeToPackage($project, array($file), 'files');
              $this->addElementsOfTypeToPackage($project, $file->getConstants()->getAll(), 'constants');
              $this->addElementsOfTypeToPackage($project, $file->getFunctions()->getAll(), 'functions');
              $this->addElementsOfTypeToPackage($project, $file->getClasses()->getAll(), 'classes');
              $this->addElementsOfTypeToPackage($project, $file->getInterfaces()->getAll(), 'interfaces');
              $this->addElementsOfTypeToPackage($project, $file->getTraits()->getAll(), 'traits');
          }
      }
code_tokens: public function execute ( ProjectDescriptor $ project ) { $ rootPackageDescriptor = new PackageDescriptor ( ) ; $ rootPackageDescriptor -> setName ( '\\' ) ; $ project -> getIndexes ( ) -> set ( 'packages' , new Collection ( ) ) ; $ project -> getIndexes ( ) -> packages [ '\\' ] = $ rootPackageDescriptor ; foreach ( $ project -> getFiles ( ) as $ file ) { $ this -> addElementsOfTypeToPackage ( $ project , array ( $ file ) , 'files' ) ; $ this -> addElementsOfTypeToPackage ( $ project , $ file -> getConstants ( ) -> getAll ( ) , 'constants' ) ; $ this -> addElementsOfTypeToPackage ( $ project , $ file -> getFunctions ( ) -> getAll ( ) , 'functions' ) ; $ this -> addElementsOfTypeToPackage ( $ project , $ file -> getClasses ( ) -> getAll ( ) , 'classes' ) ; $ this -> addElementsOfTypeToPackage ( $ project , $ file -> getInterfaces ( ) -> getAll ( ) , 'interfaces' ) ; $ this -> addElementsOfTypeToPackage ( $ project , $ file -> getTraits ( ) -> getAll ( ) , 'traits' ) ; } }
docstring: Compiles a 'packages' index on the project and create all Package Descriptors necessary.
  
  @param ProjectDescriptor $project
  
  @return void
docstring_tokens: Compiles a packages index on the project and create all Package Descriptors necessary .