FunctionalTestCase   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createClient() 0 3 2
1
<?php
2
3
/*
4
 * This file is part of Guzzle HTTP JSON-RPC
5
 *
6
 * Copyright (c) 2014 Nature Delivered Ltd. <http://graze.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * @see  http://github.com/graze/guzzle-jsonrpc/blob/master/LICENSE
12
 * @link http://github.com/graze/guzzle-jsonrpc
13
 */
14
15
namespace Graze\GuzzleHttp\JsonRpc\Test;
16
17
use Graze\GuzzleHttp\JsonRpc\Client;
18
use PHPUnit_Framework_TestCase as TestCase;
19
20
class FunctionalTestCase extends TestCase
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $defaultUrl = 'http://node:80';
26
27
    /**
28
     * @param  string|null $url
29
     * @param  array       $config
30
     *
31
     * @return Client
32
     */
33
    public function createClient($url = null, array $config = [])
34
    {
35
        return Client::factory($url ?: $this->defaultUrl, $config);
36
    }
37
}
38