| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 66 | protected function populate(stdClass $response) |
||
| 67 | { |
||
| 68 | $ordersList = clone $this; |
||
| 69 | $ordersList->data = new stdClass(); |
||
| 70 | |||
| 71 | $ordersList->data->orders = $response->orders; |
||
| 72 | |||
| 73 | $ordersList->data->summary = $response->summary; |
||
| 74 | $ordersList->_links = $response->_links; |
||
|
|
|||
| 75 | |||
| 76 | return $ordersList; |
||
| 77 | } |
||
| 78 | } |
||
| 79 |
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: