Factory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 7
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A createClient() 0 5 1
1
<?php
2
3
namespace seregazhuk\React\Memcached;
4
5
use React\EventLoop\LoopInterface;
6
use React\Socket\Connector;
7
use seregazhuk\React\Memcached\Connection\Connection;
8
use seregazhuk\React\Memcached\Protocol\Parser;
9
10
class Factory
11
{
12
    public static function createClient(LoopInterface $loop, string $address = 'localhost:11211'): Client
13
    {
14
        $connection = new Connection($address, new Connector($loop));
15
16
        return new Client($connection, new Parser());
17
    }
18
}
19