Completed
Push — master ( 930c0f...68d0e6 )
by Stéphane
03:38
created

ClientFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 5 1
1
<?php
2
/**
3
 * This file is part of the bee4/transport package.
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 *
7
 * @copyright Bee4 2015
8
 * @author  Stephane HULARD <[email protected]>
9
 * @package Bee4\Transport
10
 */
11
12
namespace Bee4\Transport;
13
14
/**
15
 * A client builder
16
 * @package Bee4\Transport
17
 */
18
class ClientFactory
19
{
20
    /**
21
     * Create a new client instance
22
     * @param  string $url The root URL used by the client
23
     * @return ClientInterface The generated instance
24
     */
25
    public static function create($url = '')
26
    {
27
        $instance = new Client($url);
28
        return new MagicHandler($instance);
29
    }
30
}
31