Passed
Push — master ( bc3840...800ced )
by Camilo
01:52
created

PingReq   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 19
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A createPayload() 0 3 1
A shouldExpectAnswer() 0 3 1
A createVariableHeader() 0 3 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\WritableContent;
9
use unreal4u\MQTT\Internals\WritableContentInterface;
10
11
final class PingReq extends ProtocolBase implements WritableContentInterface
12
{
13
    use WritableContent;
14
15
    const CONTROL_PACKET_VALUE = 12;
16
17 1
    public function createVariableHeader(): string
18
    {
19 1
        return '';
20
    }
21
22 1
    public function createPayload(): string
23
    {
24 1
        return '';
25
    }
26
27
    public function shouldExpectAnswer(): bool
28
    {
29
        return true;
30
    }
31
}
32