Completed
Pull Request — master (#14)
by Pavel
03:24
created

RpcRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Bankiru\Api\Doctrine\Rpc;
4
5
use ScayTrase\Api\Rpc\RpcRequestInterface;
6
7
/**
8
 * @internal
9
 */
10
// private
11
final class RpcRequest implements RpcRequestInterface
12
{
13
    /** @var  string */
14
    private $method;
15
    /** @var  array */
16
    private $parameters;
17
18
    /**
19
     * RpcRequest constructor.
20
     *
21
     * @param string $method
22
     * @param array  $parameters
23
     */
24 18
    public function __construct($method, array $parameters = [])
25
    {
26 18
        $this->method     = (string)$method;
27 18
        $this->parameters = $parameters;
28 18
    }
29
30
    /** {@inheritdoc} */
31
    public function getMethod()
32
    {
33
        return $this->method;
34
    }
35
36
    /** {@inheritdoc} */
37
    public function getParameters()
38
    {
39
        return $this->parameters;
40
    }
41
}
42