TestBase   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 3
Bugs 0 Features 2
Metric Value
wmc 1
c 3
b 0
f 2
lcom 0
cbo 3
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getClient() 0 7 1
1
<?php
2
3
namespace CommerceGuys\Guzzle\Oauth2\Tests;
4
5
use GuzzleHttp\Client;
6
7
abstract class TestBase extends \PHPUnit_Framework_TestCase
8
{
9
    /**
10
     * @param array $options
11
     * @param array $serverOptions
12
     *
13
     * @return \GuzzleHttp\ClientInterface
14
     */
15
    protected function getClient(array $options = [], array $serverOptions = [])
16
    {
17
        $server = new MockOAuth2Server($serverOptions);
18
        return new Client([
19
                'handler' => $server->getHandler()
20
            ] + $options);
21
    }
22
}
23