Completed
Pull Request — master (#33)
by Márk
39:13 queued 29:54
created

PluginClientFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createPluginClient() 0 4 1
1
<?php
2
3
namespace Http\HttplugBundle\ClientFactory;
4
5
use Http\Client\Plugin\PluginClient;
6
7
/**
8
 * This factory creates a PluginClient.
9
 *
10
 * @author Tobias Nyholm <[email protected]>
11
 */
12
class PluginClientFactory
13
{
14
    /**
15
     * @param array                  $plugins
16
     * @param ClientFactoryInterface $factory
17
     * @param array                  $config
18
     *
19
     * @return PluginClient
20
     */
21
    public static function createPluginClient(array $plugins, ClientFactoryInterface $factory, array $config)
22
    {
23
        return new PluginClient($factory->createClient($config), $plugins);
24
    }
25
}
26