get('gh_token', '')) { $options->set('gh.token', $params->get('gh_token', '')); } // Set the username and password if set in the params elseif ($params->get('gh_user', '') && $params->get('gh_password')) { $options->set('api.username', $params->get('gh_user', '')); $options->set('api.password', $params->get('gh_password', '')); } // Display a message about the lowered API limit without credentials else { JFactory::getApplication()->enqueueMessage(JText::_('COM_PATCHTESTER_NO_CREDENTIALS'), 'notice'); } return new JGithub($options); } }