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

OAuth1Factory::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 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