/** * Get JIRA API * * @return Api */ protected function getApi() { $password = new Password(); return new Api($this->getConfig()->getNode('tracker/jira/url'), new Basic($this->getConfig()->getNode('tracker/jira/username'), $password->getPassword($this->getTrackerType()))); }
/** * Get GitHub API * * @return Api */ protected function getApi() { if ($this->api === null) { $password = new Password(); $this->api = new Api(); $this->api->authenticate($this->getConfig()->getNode('tracker/github/username'), $password->getPassword($this->getTrackerType())); } return $this->api; }