Completed
Push — master ( 257530...5ee91e )
by Camilo
01:42
created

PingReq::createVariableHeader()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace unreal4u\MQTT\Protocol;
6
7
use unreal4u\MQTT\Internals\ProtocolBase;
8
use unreal4u\MQTT\Internals\ReadableContentInterface;
9
use unreal4u\MQTT\Internals\WritableContent;
10
use unreal4u\MQTT\Internals\WritableContentInterface;
11
12
final class PingReq extends ProtocolBase implements WritableContentInterface
13
{
14
    use WritableContent;
15
16
    const CONTROL_PACKET_VALUE = 12;
17
18 1
    public function createVariableHeader(): string
19
    {
20 1
        return '';
21
    }
22
23 1
    public function createPayload(): string
24
    {
25 1
        return '';
26
    }
27
28
    public function expectAnswer(string $data): ReadableContentInterface
29
    {
30
        $this->logger->info('String of incoming data confirmed, returning new object', ['class' => \get_class($this)]);
31
        $pingResp = new PingResp($this->logger);
32
        $pingResp->populate($data);
33
        return $pingResp;
34
    }
35
36
    public function shouldExpectAnswer(): bool
37
    {
38
        return true;
39
    }
40
}
41