Completed
Push — master ( accf18...c40548 )
by Camilo
02:13
created

EmptyReadableResponse   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getOriginControlPacket() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace unreal4u\MQTT\Application;
6
7
use unreal4u\MQTT\Internals\ProtocolBase;
8
use unreal4u\MQTT\Internals\ReadableContent;
9
use unreal4u\MQTT\Internals\ReadableContentInterface;
10
11
/**
12
 * This is an example of a payload class that performs some processing on the data
13
 *
14
 * This particular case will prepend a datetime to the message itself. It will json_encode() it into the payload and
15
 * when retrieving it will set the public property $originalPublishDateTime.
16
 */
17
final class EmptyReadableResponse extends ProtocolBase implements ReadableContentInterface
18
{
19
    use ReadableContent;
20
21
    /**
22
     * @inheritdoc
23
     */
24 1
    public function getOriginControlPacket(): int
25
    {
26 1
        return 0;
27
    }
28
}
29