GeneratedDefinition::setMethods()   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: 11:01
9
 */
10
11
declare(strict_types=1);
12
13
namespace Onnov\JsonRpcServer\Definition;
14
15
/**
16
 * Class GeneratedDefinition
17
 *
18
 * @package Onnov\JsonRpcServer\Definition
19
 */
20
class GeneratedDefinition extends RpcGeneralDefinition
21
{
22
    /**
23
     * Definitions of the available procedures in the api.
24
     * A key equals to the name of a procedure.
25
     *
26
     * @var RpcProcedureDefinition[]
27
     */
28
    private $methods;
29
30
    /**
31
     * @return RpcProcedureDefinition[]
32
     */
33
    public function getMethods(): array
34
    {
35
        return $this->methods;
36
    }
37
38
    /**
39
     * @param  RpcProcedureDefinition[] $methods
40
     * @return GeneratedDefinition
41
     */
42
    public function setMethods(array $methods): self
43
    {
44
        $this->methods = $methods;
45
46
        return $this;
47
    }
48
}
49