/**
  * Removes a project's source code from the server.
  * 
  * @param Project $project
  */
 protected function removeProjectData(Project $project)
 {
     $this->fileSystem->remove($project->getFilepath());
 }
Example #2
0
 /**
  * Makes the preparations for the analysis process: unzips the source code of the project
  * into a temporary directory and returns its path.
  * 
  * @param Project $project
  * 
  * @return string
  * 
  * @throws FileNotFoundException
  */
 protected function prepare(Project $project)
 {
     $sourceFile = $project->getFilepath();
     if (!is_file($sourceFile)) {
         throw new FileNotFoundException('The project source code was expected to still exist!');
     }
     $projectDir = $this->createTempDirectory();
     $this->unzip($sourceFile, $projectDir);
     return $projectDir;
 }