| Conditions | 1 |
| Paths | 1 |
| Total Lines | 27 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function send(RequestInterface $request) |
||
| 22 | { |
||
| 23 | $this->request = $request; |
||
|
|
|||
| 24 | |||
| 25 | return new Response( |
||
| 26 | 200, |
||
| 27 | ['Content-type' => 'application/json', 'etag' => 'an etag'], |
||
| 28 | [ |
||
| 29 | 'code' => 200, |
||
| 30 | 'status' => 'ok', |
||
| 31 | 'etag' => 'an etag', |
||
| 32 | 'data' => [ |
||
| 33 | 'offset' => 0, |
||
| 34 | 'limit' => 20, |
||
| 35 | 'total' => 1, |
||
| 36 | 'count' => 1, |
||
| 37 | 'results' => [ |
||
| 38 | [ |
||
| 39 | 'id' => 0, |
||
| 40 | 'title' => 'a title for comic 0', |
||
| 41 | 'resourceURI' => Client::BASE_URL . 'comics/0', |
||
| 42 | ], |
||
| 43 | ], |
||
| 44 | ], |
||
| 45 | ] |
||
| 46 | ); |
||
| 47 | } |
||
| 48 | } |
||
| 49 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: