ObserverPooler::getPoolerType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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