Test Setup Failed
Push — master ( 567fb1...dda424 )
by Syed Abidur
02:05
created

Response::getResponseString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Sarahman\SmsService;
4
5
use Illuminate\Support\Contracts\ArrayableInterface;
6
7
class Response implements ArrayableInterface
8
{
9
    /**
10
     * Returns the status of the response as boolean.
11
     *
12
     * @var bool
13
     */
14
    private $status = false;
15
16
    /**
17
     * Returns the text of the response as string.
18
     *
19
     * @var string
20
     */
21
    private $responseString;
22
23
    /**
24
      * @param bool   $status
25
      * @param string $responseString
26
      */
27
    public function __construct($status, $responseString)
28
    {
29
        $this->status = $status;
30
        $this->responseString = $responseString;
31
    }
32
33
    public function toArray()
34
    {
35
        return [
36
            'status'   => $this->status,
37
            'response' => $this->responseString,
38
        ];
39
    }
40
41
    public function getStatus()
42
    {
43
        return $this->status;
44
    }
45
46
    public function getResponseString()
47
    {
48
        return $this->responseString;
49
    }
50
}
51