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

RpcRequestMock   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 31
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getMethod() 0 4 1
A getParameters() 0 4 1
1
<?php
2
3
namespace Bankiru\Api\Doctrine\Test;
4
5
use ScayTrase\Api\Rpc\RpcRequestInterface;
6
7
/**
8
 * @internal
9
 */
10
// private
11
final class RpcRequestMock implements RpcRequestInterface
12
{
13
    /** @var  string */
14
    private $method;
15
    /** @var  array */
16
    private $parameters;
17
18
    /**
19
     * RpcRequestMock constructor.
20
     *
21
     * @param string $method
22
     * @param array  $parameters
23
     */
24
    public function __construct($method, array $parameters = [])
25
    {
26
        $this->method     = (string)$method;
27
        $this->parameters = $parameters;
28
    }
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