Completed
Push — master ( 39b3fc...3ebb26 )
by Sergey
12:04 queued 07:06
created

RpcInfoDefinition::setTitle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
/**
4
 * Created by PhpStorm.
5
 * Project: json-rpc-server
6
 * User: sv
7
 * Date: 06.02.2021
8
 * Time: 10:46
9
 */
10
11
declare(strict_types=1);
12
13
namespace Onnov\JsonRpcServer\Definition;
14
15
/**
16
 * Class RpcInfoDefinition
17
 * @package Onnov\JsonRpcServer\Definition
18
 */
19
class RpcInfoDefinition
20
{
21
    use CastableToArray;
22
23
    /**
24
     * Name of the api.
25
     *
26
     * @var string
27
     */
28
    private $title;
29
30
    /**
31
     * Description or usage information about the api.
32
     *
33
     * @var string|string[]|null
34
     */
35
    private $description = null;
36
37
    /**
38
     * Current version of the api.
39
     *
40
     * @var string
41
     */
42
    private $version;
43
44
    /**
45
     * @return string
46
     */
47
    public function getTitle(): string
48
    {
49
        return $this->title;
50
    }
51
52
    /**
53
     * @param string $title
54
     * @return RpcInfoDefinition
55
     */
56
    public function setTitle(string $title): self
57
    {
58
        $this->title = $title;
59
60
        return $this;
61
    }
62
63
    /**
64
     * @return string|string[]|null
65
     */
66
    public function getDescription()
67
    {
68
        return $this->description;
69
    }
70
71
    /**
72
     * @param string|string[]|null $description
73
     * @return RpcInfoDefinition
74
     */
75
    public function setDescription($description): self
76
    {
77
        $this->description = $description;
78
79
        return $this;
80
    }
81
82
    /**
83
     * @return string
84
     */
85
    public function getVersion(): string
86
    {
87
        return $this->version;
88
    }
89
90
    /**
91
     * @param string $version
92
     * @return RpcInfoDefinition
93
     */
94
    public function setVersion(string $version): self
95
    {
96
        $this->version = $version;
97
98
        return $this;
99
    }
100
}
101