/**
  * @return mixed
  */
 protected function call()
 {
     $projectName = $this->loader->getProjectName();
     $projectKey = null;
     try {
         $projects = $this->api->getProjects()->json();
         foreach ($projects as $project) {
             if ($project['name'] == $projectName) {
                 $projectKey = $project['project_key'];
                 break;
             }
         }
         if ($projectKey === null) {
             $response = $this->api->postProject($this->loader->getComposerJson());
         } else {
             $response = $this->api->updateProject($projectKey, $this->loader->getComposerJson());
         }
     } catch (\Exception $e) {
         return new VersionEyeResult(VersionEyeResult::STATUS_ERR);
     }
     return new VersionEyeResult(VersionEyeResult::STATUS_OK, $response->json());
 }
 /**
  * @test
  */
 public function testGetProjectNameNoFile()
 {
     $this->object = new ComposerLoader('foobar_notexists');
     $projectName = $this->object->getProjectName();
     $this->assertNull($projectName);
 }