Completed
Push — master ( c97103...9edfc5 )
by Evgenij
03:08
created

AbstractServerIo   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A write() 0 4 1
A isConnected() 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\Socket\Io;
11
12
use AsyncSockets\Exception\NetworkSocketException;
13
14
/**
15
 * Class AbstractServerIo
16
 */
17
abstract class AbstractServerIo extends AbstractIo
18
{
19
    /** {@inheritdoc} */
20 4
    public function write($data, Context $context, $isOutOfBand)
21
    {
22 4
        throw new NetworkSocketException($this->socket, 'Can not write data to tcp/udp server socket.');
23
    }
24
25
    /**
26
     * @inheritDoc
27
     */
28 2
    public function isConnected()
29
    {
30 2
        return true;
31
    }
32
}
33