Completed
Branch 0.4-dev (f2f961)
by Evgenij
02:48
created

NullIoHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

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