ClientFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
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
    protected function __construct()
21
    {
22
        //Just a factory helper, can't be instantiated
23
    }
24
25
    /**
26
     * Create a new client instance
27
     * @param  string $url The root URL used by the client
28
     * @return ClientInterface The generated instance
29
     */
30
    public static function create($url = '')
31
    {
32
        $instance = new Client($url);
33
        return new MagicHandler($instance);
34
    }
35
}
36