Completed
Branch feature-persistent-connect (647c46)
by Evgenij
03:19
created

EmptyFramePicker   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 15
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A doHandleData() 0 5 1
A doCreateFrame() 0 4 1
1
<?php
2
/**
3
 * Async sockets
4
 *
5
 * @copyright Copyright (c) 2016, Efimov Evgenij <[email protected]>
6
 *
7
 * This source file is subject to the MIT license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
namespace AsyncSockets\Frame;
11
12
/**
13
 * Class EmptyFramePicker
14
 */
15
class EmptyFramePicker extends AbstractFramePicker
16
{
17
    /** {@inheritdoc} */
18 1
    protected function doHandleData($chunk, $remoteAddress, &$buffer)
19
    {
20 1
        $this->setFinished(true);
21 1
        return $chunk;
22
    }
23
24
    /** {@inheritdoc} */
25 1
    protected function doCreateFrame($buffer, $remoteAddress)
26
    {
27 1
        return new EmptyFrame($remoteAddress);
28
    }
29
}
30