| Total Complexity | 2 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class TwitterConnectionFactory implements VendorConnectionFactory |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | private $oauthToken; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | private $oauthTokenSecret; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * TwitterConnectionFactory constructor. |
||
| 30 | * @param string $oauthToken |
||
| 31 | * @param string $oauthTokenSecret |
||
| 32 | */ |
||
| 33 | public function __construct($oauthToken, $oauthTokenSecret) |
||
| 34 | { |
||
| 35 | $this->oauthToken = $oauthToken; |
||
| 36 | $this->oauthTokenSecret = $oauthTokenSecret; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $clientId the client id which can be generated at the third party portal |
||
| 41 | * @param string $clientSecret this can be found similar to the clientId |
||
| 42 | * @param string $callbackUrl the url to callback after a third party auth attempt |
||
| 43 | * @return VendorConnection |
||
| 44 | */ |
||
| 45 | public function get($clientId, $clientSecret, $callbackUrl) |
||
| 54 | ) |
||
| 55 | ); |
||
| 58 |