CustomParams::age()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace PhpJsonRpc\Server\Stub\ValueObject;
4
5
use PhpJsonRpc\Server\Request\Params;
6
7
class CustomParams
8
{
9
    /**
10
     * @var string
11
     */
12
    private $name;
13
14
    /**
15
     * @var int
16
     */
17
    private $age;
18
19
    /**
20
     * @param Params $params
21
     */
22
    public function __construct(Params $params)
23
    {
24
        $this->name = $params->get('name');
25
        $this->age  = $params->get('age');
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function name()
32
    {
33
        return $this->name;
34
    }
35
36
    /**
37
     * @return int
38
     */
39
    public function age()
40
    {
41
        return $this->age;
42
    }
43
}
44