Completed
Branch master (1d1574)
by Evgenij
18:38
created

DisconnectedIo   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A read() 0 4 1
A write() 0 4 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\Socket\Io;
11
12
use AsyncSockets\Exception\NetworkSocketException;
13
use AsyncSockets\Frame\FramePickerInterface;
14
15
/**
16
 * Class DisconnectedIo
17
 */
18
class DisconnectedIo extends AbstractIo
19
{
20
    /** {@inheritdoc} */
21 11
    public function read(FramePickerInterface $picker)
22
    {
23 11
        throw new NetworkSocketException($this->socket, 'Can not start io operation on uninitialized socket.');
24
    }
25
26
    /** {@inheritdoc} */
27 11
    public function write($data)
28
    {
29 11
        throw new NetworkSocketException($this->socket, 'Can not start io operation on uninitialized socket.');
30
    }
31
}
32