RpcInfoDefinition::setDescription()   A
last analyzed

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
 *
18
 * @package Onnov\JsonRpcServer\Definition
19
 */
20
class RpcInfoDefinition
21
{
22
    use CastableToArray;
23
24
    /**
25
     * Name of the api.
26
     *
27
     * @var string
28
     */
29
    private $title;
30
31
    /**
32
     * Description or usage information about the api.
33
     *
34
     * @var string|string[]|null
35
     */
36
    private $description = null;
37
38
    /**
39
     * Current version of the api.
40
     *
41
     * @var string
42
     */
43
    private $version;
44
45
    /**
46
     * @return string
47
     */
48
    public function getTitle(): string
49
    {
50
        return $this->title;
51
    }
52
53
    /**
54
     * @param  string $title
55
     * @return RpcInfoDefinition
56
     */
57
    public function setTitle(string $title): self
58
    {
59
        $this->title = $title;
60
61
        return $this;
62
    }
63
64
    /**
65
     * @return string|string[]|null
66
     */
67
    public function getDescription()
68
    {
69
        return $this->description;
70
    }
71
72
    /**
73
     * @param  string|string[]|null $description
74
     * @return RpcInfoDefinition
75
     */
76
    public function setDescription($description): self
77
    {
78
        $this->description = $description;
79
80
        return $this;
81
    }
82
83
    /**
84
     * @return string
85
     */
86
    public function getVersion(): string
87
    {
88
        return $this->version;
89
    }
90
91
    /**
92
     * @param  string $version
93
     * @return RpcInfoDefinition
94
     */
95
    public function setVersion(string $version): self
96
    {
97
        $this->version = $version;
98
99
        return $this;
100
    }
101
}
102