NullIoHandler   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 32
ccs 6
cts 6
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A supports() 0 4 1
A handleOperation() 0 9 1
A getHandlerType() 0 4 1
1
<?php
2
/**
3
 * Async sockets
4
 *
5
 * @copyright Copyright (c) 2015-2017, 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\RequestExecutor\Pipeline;
11
12
use AsyncSockets\Operation\NullOperation;
13
use AsyncSockets\Operation\OperationInterface;
14
use AsyncSockets\RequestExecutor\EventHandlerInterface;
15
use AsyncSockets\RequestExecutor\ExecutionContext;
16
use AsyncSockets\RequestExecutor\Metadata\RequestDescriptor;
17
use AsyncSockets\RequestExecutor\RequestExecutorInterface;
18
19
/**
20
 * Class NullIoHandler
21
 */
22
class NullIoHandler extends AbstractOobHandler
23
{
24
    /**
25
     * @inheritDoc
26
     */
27 1
    public function supports(OperationInterface $operation)
28
    {
29 1
        return $operation instanceof NullOperation;
30
    }
31
32
    /**
33
     * @inheritDoc
34
     */
35 1
    protected function handleOperation(
36
        OperationInterface $operation,
37
        RequestDescriptor $descriptor,
38
        RequestExecutorInterface $executor,
39
        EventHandlerInterface $eventHandler,
40
        ExecutionContext $executionContext
41
    ) {
42
        // empty body
43 1
    }
44
45
    /**
46
     * @inheritDoc
47
     */
48 2
    protected function getHandlerType()
49
    {
50 2
        return RequestDescriptor::RDS_READ;
51
    }
52
53
}
54