Completed
Push — master ( d06bab...02e31a )
by Eugene
03:46
created

JoinRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 3
c 2
b 0
f 1
lcom 1
cbo 0
dl 0
loc 21
ccs 0
cts 14
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getType() 0 4 1
A getBody() 0 6 1
1
<?php
2
3
namespace Tarantool\Client\Request;
4
5
use Tarantool\Client\IProto;
6
7
class JoinRequest implements Request
8
{
9
    private $serverUuid;
10
11
    public function __construct($serverUuid)
12
    {
13
        $this->serverUuid = $serverUuid;
14
    }
15
16
    public function getType()
17
    {
18
        return self::TYPE_JOIN;
19
    }
20
21
    public function getBody()
22
    {
23
        return [
24
            IProto::SERVER_UUID => $this->serverUuid,
25
        ];
26
    }
27
}
28