| @@ 93-107 (lines=15) @@ | ||
| 90 | * |
|
| 91 | * @return PlaceDetailResponse |
|
| 92 | */ |
|
| 93 | private function buildResponse(array $data) |
|
| 94 | { |
|
| 95 | $response = new PlaceDetailResponse(); |
|
| 96 | $response->setStatus($data['status']); |
|
| 97 | ||
| 98 | if (isset($data['result'])) { |
|
| 99 | $response->setResult($this->buildResult($data['result'])); |
|
| 100 | } |
|
| 101 | ||
| 102 | if (isset($data['html_attributions'])) { |
|
| 103 | $response->setHtmlAttributions($data['html_attributions']); |
|
| 104 | } |
|
| 105 | ||
| 106 | return $response; |
|
| 107 | } |
|
| 108 | ||
| 109 | /** |
|
| 110 | * @param mixed[] $data |
|
| @@ 72-87 (lines=16) @@ | ||
| 69 | * |
|
| 70 | * @return PlaceSearchResponse |
|
| 71 | */ |
|
| 72 | private function buildResponse(array $data) |
|
| 73 | { |
|
| 74 | $response = new PlaceSearchResponse(); |
|
| 75 | $response->setStatus($data['status']); |
|
| 76 | $response->setResults($this->buildResults($data['results'])); |
|
| 77 | ||
| 78 | if (isset($data['html_attributions'])) { |
|
| 79 | $response->setHtmlAttributions($data['html_attributions']); |
|
| 80 | } |
|
| 81 | ||
| 82 | if (isset($data['next_page_token'])) { |
|
| 83 | $response->setNextPageToken($data['next_page_token']); |
|
| 84 | } |
|
| 85 | ||
| 86 | return $response; |
|
| 87 | } |
|
| 88 | ||
| 89 | /** |
|
| 90 | * @param mixed[] $data |
|