Completed
Push — master ( 055f1b...f72a4b )
by Pavel
52s
created

Response::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 1
ccs 0
cts 0
cp 0
rs 10
cc 1
eloc 1
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: batanov.pavel
5
 * Date: 16.05.2016
6
 * Time: 13:53
7
 */
8
9
namespace Bankiru\Api\Rpc\Impl;
10
11
use ScayTrase\Api\Rpc\RpcErrorInterface;
12
use ScayTrase\Api\Rpc\RpcResponseInterface;
13
14
final class Response implements RpcResponseInterface
15
{
16
    private $body;
17
18
    /**
19
     * Response constructor.
20
     *
21
     * @param $body
22
     */
23
    public function __construct($body) { $this->body = $body; }
24
25
26
    /** @return bool */
27
    public function isSuccessful()
28
    {
29
        return true;
30
    }
31
32
    /** @return RpcErrorInterface|null */
33
    public function getError()
34
    {
35
        return null;
36
    }
37
38
    /** @return \stdClass|array|mixed|null */
39 3
    public function getBody()
40
    {
41 3
        return $this->body;
42
    }
43
}
44