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

NullIoHandler::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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