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

NullIoHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A supports() 0 4 1
A handle() 0 8 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\RequestExecutor\Pipeline;
11
12
use AsyncSockets\Operation\NullOperation;
13
use AsyncSockets\Operation\OperationInterface;
14
use AsyncSockets\RequestExecutor\EventHandlerInterface;
15
use AsyncSockets\RequestExecutor\IoHandlerInterface;
16
use AsyncSockets\RequestExecutor\RequestExecutorInterface;
17
use AsyncSockets\Socket\SocketInterface;
18
19
/**
20
 * Class NullIoHandler
21
 */
22
class NullIoHandler implements IoHandlerInterface
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
    public function handle(
36
        OperationInterface $operation,
37
        SocketInterface $socket,
38
        RequestExecutorInterface $executor,
39
        EventHandlerInterface $eventHandler
40
    ) {
41
        // empty body
42 1
    }
43
}
44