| Total Complexity | 2 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class GitHubConnectionFactory implements VendorConnectionFactory |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | private $oauthAppName; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param string $oauthAppName |
||
| 25 | */ |
||
| 26 | 1 | public function __construct($oauthAppName) |
|
| 29 | 1 | } |
|
| 30 | |||
| 31 | /** |
||
| 32 | * Returns a GitHub Connection instance using given credentials. Visit the following link for credentials. |
||
| 33 | * @see https://github.com/settings/applications/new |
||
| 34 | * |
||
| 35 | * @param string $clientId the client id which can be generated at the third party portal |
||
| 36 | * @param string $clientSecret this can be found similar to the clientId |
||
| 37 | * @param string $callbackUrl the url to callback after a third party auth attempt |
||
| 38 | * @return VendorConnection |
||
| 39 | */ |
||
| 40 | 1 | public function get($clientId, $clientSecret, $callbackUrl) |
|
| 53 |