Completed
Pull Request — master (#33)
by Márk
31:08
created

PluginClientFactory::createPluginClient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 3
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