Dice   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 3

Importance

Changes 0
Metric Value
wmc 5
lcom 2
cbo 3
dl 0
loc 71
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getValue() 0 4 1
A setValue() 0 7 1
A getName() 0 4 1
A setName() 0 7 1
1
<?php
2
# Generated by the protocol buffer compiler.  DO NOT EDIT!
3
# source: protos/dice.proto
4
5
namespace MeadSteve\DiceApi\Protos\V1;
6
7
use Google\Protobuf\Internal\GPBType;
8
use Google\Protobuf\Internal\RepeatedField;
9
use Google\Protobuf\Internal\GPBUtil;
10
11
/**
12
 * Generated from protobuf message <code>MeadSteve.DiceApi.Protos.V1.Dice</code>
13
 */
14
class Dice extends \Google\Protobuf\Internal\Message
15
{
16
    /**
17
     * Generated from protobuf field <code>int32 value = 1;</code>
18
     */
19
    private $value = 0;
20
    /**
21
     * Generated from protobuf field <code>string name = 2;</code>
22
     */
23
    private $name = '';
24
25
    /**
26
     * Constructor.
27
     *
28
     * @param array $data {
29
     *     Optional. Data for populating the Message object.
30
     *
31
     *     @type int $value
32
     *     @type string $name
33
     * }
34
     */
35
    public function __construct($data = NULL) {
36
        \MeadSteve\DiceApi\Protos\V1\Meta\Dice::initOnce();
37
        parent::__construct($data);
38
    }
39
40
    /**
41
     * Generated from protobuf field <code>int32 value = 1;</code>
42
     * @return int
43
     */
44
    public function getValue()
45
    {
46
        return $this->value;
47
    }
48
49
    /**
50
     * Generated from protobuf field <code>int32 value = 1;</code>
51
     * @param int $var
52
     * @return $this
53
     */
54
    public function setValue($var)
55
    {
56
        GPBUtil::checkInt32($var);
57
        $this->value = $var;
58
59
        return $this;
60
    }
61
62
    /**
63
     * Generated from protobuf field <code>string name = 2;</code>
64
     * @return string
65
     */
66
    public function getName()
67
    {
68
        return $this->name;
69
    }
70
71
    /**
72
     * Generated from protobuf field <code>string name = 2;</code>
73
     * @param string $var
74
     * @return $this
75
     */
76
    public function setName($var)
77
    {
78
        GPBUtil::checkString($var, True);
79
        $this->name = $var;
80
81
        return $this;
82
    }
83
84
}
85
86