Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | function __construct( \GuzzleHttp\Psr7\Response $response = null ) |
||
|
|||
22 | { |
||
23 | $this->response = $response; |
||
24 | $this->headers = $response->getHeaders(); |
||
25 | $this->bodyRaw = (string) $response->getBody(); |
||
26 | $this->body = json_decode( $this->bodyRaw ); |
||
27 | |||
28 | # Set our properties: |
||
29 | $this->statusCode = $response->getStatusCode(); |
||
30 | $this->timestamp = date('c'); |
||
31 | } |
||
32 | |||
67 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.