| Total Complexity | 2 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class FacebookConnectionFactory implements VendorConnectionFactory |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var ThirdPartyStorageRepository |
||
| 20 | */ |
||
| 21 | private $storageRepository; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $defaultGraphVersion; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | private $permissions; |
||
| 32 | |||
| 33 | 1 | public function __construct( |
|
| 34 | ThirdPartyStorageRepository $storageRepository, |
||
| 35 | $defaultGraphVersion = 'v2.12', |
||
| 36 | $permissions = 'public_profile,email' |
||
| 37 | ) { |
||
| 38 | 1 | $this->storageRepository = $storageRepository; |
|
| 39 | 1 | $this->defaultGraphVersion = $defaultGraphVersion; |
|
| 40 | 1 | $this->permissions = $permissions; |
|
| 41 | 1 | } |
|
| 42 | |||
| 43 | /** |
||
| 44 | * @param string $clientId the client id which can be generated at the third party portal |
||
| 45 | * @param string $clientSecret this can be found similar to the clientId |
||
| 46 | * @param string $callbackUrl the url to callback after a third party auth attempt |
||
| 47 | * @return VendorConnection |
||
| 48 | */ |
||
| 49 | 1 | public function get($clientId, $clientSecret, $callbackUrl) |
|
| 60 | 1 | ); |
|
| 61 | } |
||
| 63 |