Completed
Push — master ( ba7f88...54d2d5 )
by Risan Bagja
02:22
created

Provider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 21
wmc 1
lcom 0
cbo 1
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
defaultConfig() 0 1 ?
1
<?php
2
3
namespace OAuth1\Providers;
4
5
use OAuth1\OAuth1;
6
use OAuth1\Contracts\Providers\Provider as ProviderContract;
7
8
abstract class Provider extends OAuth1 implements ProviderContract
9
{
10
    /**
11
     * Create a new instance of Twitter client class.
12
     *
13
     * @param array $config
14
     */
15 24
    public function __construct(array $config)
16
    {
17 24
        $config = array_merge($config, $this->defaultConfig());
18
19 24
        parent::__construct($config, null);
20 24
    }
21
22
    /**
23
     * Get default provider's configuration.
24
     *
25
     * @return array
26
     */
27
    abstract public function defaultConfig();
28
}
29