Passed
Push — master ( 379291...a772d5 )
by Tharanga
09:14
created

ZoomConnectionFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A get() 0 9 1
1
<?php
2
/**
3
 * @author Tharanga Kothalawala <[email protected]>
4
 * @date   28-10-2020
5
 */
6
7
namespace TSK\SSO\ThirdParty\Zoom;
8
9
use TSK\SSO\ThirdParty\VendorConnection;
10
use TSK\SSO\ThirdParty\VendorConnectionFactory;
11
use TSK\SSO\Http\CurlRequest;
12
13
/**
14
 * @package TSK\SSO\ThirdParty\Zoom
15
 */
16
class ZoomConnectionFactory implements VendorConnectionFactory
17
{
18
    /**
19
     * @param string $clientId     the client id which can be generated at the third party portal
20
     * @param string $clientSecret this can be found similar to the clientId
21
     * @param string $callbackUrl  the url to callback after a third party auth attempt
22
     *
23
     * @return VendorConnection
24
     */
25
    public function get($clientId, $clientSecret, $callbackUrl)
26
    {
27
        return new ZoomConnection(
28
            new ZoomApiConfiguration(
29
                $clientId,
30
                $clientSecret,
31
                $callbackUrl
32
            ),
33
            new CurlRequest()
34
        );
35
    }
36
}
37