CacheIOHandlerFactory::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace PhpCache\IO;
4
5
use Psr\Container\ContainerInterface;
6
7
/**
8
 * Description of CacheIOHandlerFactory.
9
 *
10
 * @author dude920228
11
 */
12
class CacheIOHandlerFactory
13
{
14
    public function __invoke(ContainerInterface $container)
15
    {
16
        $config = $container->getConfig();
17
        $ioHandler = new CacheIOHandler($config['location'], $config['port'], $config['bufferSize'], $config['socketType']);
18
19
        return $ioHandler;
20
    }
21
}
22