EmptyFrame   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getRemoteAddress() 0 4 1
A getData() 0 4 1
A __toString() 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\Frame;
11
12
/**
13
 * Class EmptyFrame
14
 */
15
class EmptyFrame implements FrameInterface
16
{
17
    /**
18
     * Remote address
19
     *
20
     * @var string
21
     */
22
    private $remoteAddress;
23
24
    /**
25
     * EmptyFrame constructor.
26
     *
27
     * @param string $remoteAddress Remote host address
28
     */
29 3
    public function __construct($remoteAddress)
30
    {
31 3
        $this->remoteAddress = $remoteAddress;
32 3
    }
33
34
    /** {@inheritdoc} */
35 2
    public function getRemoteAddress()
36
    {
37 2
        return $this->remoteAddress;
38
    }
39
40
    /** {@inheritdoc} */
41 1
    public function getData()
42
    {
43 1
        return '';
44
    }
45
46
    /** {@inheritdoc} */
47 1
    public function __toString()
48
    {
49 1
        return '';
50
    }
51
}
52