/**
  * Tries to calculate the hash of a project's source code and attaches it if the operation is succesful.
  * 
  * @param Project $project
  * 
  * @return boolean
  * True if the operation succeeds and false otherwise.
  */
 protected function setProjectHash(Project $project)
 {
     if (($file = $project->getFile()) === null) {
         return false;
     }
     $temporaryPath = $file->getPath() . '\\' . $file->getFilename();
     $project->setHash(hash_file('sha256', $temporaryPath));
     return true;
 }