Passed
Pull Request — master (#3)
by Timothy
06:14
created

KafkaMessageRegular   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 32
loc 32
rs 10
wmc 3

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
# Generated by the protocol buffer compiler.  DO NOT EDIT!
3
# source: orderer/kafka.proto
4
5
namespace Hyperledger\Fabric\Protos\Orderer;
6
7
use Google\Protobuf\Internal\GPBType;
8
use Google\Protobuf\Internal\RepeatedField;
9
use Google\Protobuf\Internal\GPBUtil;
10
11
/**
12
 * KafkaMessageRegular wraps a marshalled envelope.
13
 *
14
 * Generated from protobuf message <code>orderer.KafkaMessageRegular</code>
15
 */
16
class KafkaMessageRegular extends \Google\Protobuf\Internal\Message
17
{
18
    /**
19
     * Generated from protobuf field <code>bytes payload = 1;</code>
20
     */
21
    private $payload = '';
22
23
    public function __construct() {
24
        \GPBMetadata\Orderer\Kafka::initOnce();
25
        parent::__construct();
26
    }
27
28
    /**
29
     * Generated from protobuf field <code>bytes payload = 1;</code>
30
     * @return string
31
     */
32
    public function getPayload()
33
    {
34
        return $this->payload;
35
    }
36
37
    /**
38
     * Generated from protobuf field <code>bytes payload = 1;</code>
39
     * @param string $var
40
     * @return $this
41
     */
42
    public function setPayload($var)
43
    {
44
        GPBUtil::checkString($var, False);
45
        $this->payload = $var;
46
47
        return $this;
48
    }
49
50
}
51
52