CacheIOHandlerFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 8
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
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