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

EmptyFramePicker::doHandleData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 3
crap 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