Completed
Pull Request — master (#3)
by Risan Bagja
02:02 queued 34s
created

OAuth1Factory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 4
dl 0
loc 15
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
1
<?php
2
3
namespace Risan\OAuth1;
4
5
use Risan\OAuth1\Request\RequestConfigFactory;
6
use Risan\OAuth1\Credentials\CredentialsFactory;
7
8
class OAuth1Factory
9
{
10
    /**
11
     * Create a new OAuth instance.
12
     *
13
     * @param  array  $config
14
     * @return \Risan\OAuth1\OAuth1
15
     */
16 1
    public static function create(array $config)
17
    {
18 1
        $requestConfig = RequestConfigFactory::create($config);
19
20 1
        return new OAuth1($requestConfig, new HttpClient, new CredentialsFactory);
21
    }
22
}
23