ObserverPooler   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 24
c 0
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPoolerType() 0 4 1
A createClient() 0 4 1
1
<?php
2
/*
3
 * This file is part of the Pomm's Foundation package.
4
 *
5
 * (c) 2014 - 2017 Grégoire HUBERT <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace PommProject\Foundation\Observer;
11
12
use PommProject\Foundation\Client\ClientPoolerInterface;
13
use PommProject\Foundation\Client\ClientPooler;
14
15
/**
16
 * ObserverPooler
17
 *
18
 * Pooler for observer clients.
19
 *
20
 * @package   Foundation
21
 * @copyright 2014 - 2017 Grégoire HUBERT
22
 * @author    Grégoire HUBERT
23
 * @license   X11 {@link http://opensource.org/licenses/mit-license.php}
24
 * @see       ClientPooler
25
 */
26
class ObserverPooler extends ClientPooler
27
{
28
    /**
29
     * getPoolerType
30
     *
31
     * @see ClientPoolerInterface
32
     */
33
    public function getPoolerType()
34
    {
35
        return 'observer';
36
    }
37
38
    /**
39
     * createClient
40
     *
41
     * @see    ClientPooler
42
     * @param  string   $channel
43
     * @return Observer
44
     */
45
    protected function createClient($channel)
46
    {
47
        return new Observer($channel);
48
    }
49
}
50